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

Merge branch 'commands-fixes' into 'master'

fix command wrong format and resources don't return commands

See merge request !10
parents 2d965b32 3e1090b8
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