Skip to content
Snippets Groups Projects
Unverified Commit 3e1090b8 authored by REIG Julien's avatar REIG Julien
Browse files

fix command wrong format and resources don't return commands

parent 2d965b32
No related branches found
No related tags found
1 merge request!10fix command wrong format and resources don't return commands
......@@ -18,9 +18,9 @@ class ResourceResource(Resource):
if get_state() == Status.OFFLINE:
return response_offline, 403
resource = get_resource(id)
resource = get_resource(id, True)
if resource:
return jsonify(resource.to_simple_dict())
return jsonify(resource.to_full_dict())
else:
return {"message": "Resource not found"}, 404
......
......@@ -17,9 +17,9 @@ class Command:
@staticmethod
def from_tuple(data):
command = Command(data[1])
command = Command(data[2])
command.id = data[0]
command.date = data[2]
command.date = data[1]
return command
@staticmethod
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment