add response 201
This commit is contained in:
parent
531e213eff
commit
f37e55e3b5
|
@ -69,7 +69,13 @@ class InventoryView(LoginMix, SnapshotMix):
|
||||||
db.session.add(snapshot)
|
db.session.add(snapshot)
|
||||||
db.session().final_flush()
|
db.session().final_flush()
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
self.response = self.schema.jsonify(snapshot)
|
self.response = jsonify(
|
||||||
|
{
|
||||||
|
'url': snapshot.device.url,
|
||||||
|
'dhid': snapshot.device.devicehub_id,
|
||||||
|
'sid': snapshot.sid,
|
||||||
|
}
|
||||||
|
)
|
||||||
self.response.status_code = 201
|
self.response.status_code = 201
|
||||||
move_json(self.tmp_snapshots, self.path_snapshot, g.user.email)
|
move_json(self.tmp_snapshots, self.path_snapshot, g.user.email)
|
||||||
return self.response
|
return self.response
|
||||||
|
|
Reference in a new issue