some ideas of updates delivery
This commit is contained in:
parent
4df8d4319e
commit
2e01fe8d67
6 changed files with 108 additions and 18 deletions
|
@ -53,13 +53,11 @@ void Handler::AddAsset::handle (Request& request) {
|
|||
asset.owner = session.owner;
|
||||
asset = srv->getDatabase()->addAsset(asset);
|
||||
|
||||
nlohmann::json body = nlohmann::json::object();
|
||||
body["asset"] = asset.toJSON();
|
||||
|
||||
Response& res = request.createResponse(Response::Status::ok);
|
||||
res.setBody(body);
|
||||
res.send();
|
||||
|
||||
session.assetAdded(asset);
|
||||
|
||||
} catch (const DB::NoSession& e) {
|
||||
return error(request, Response::Status::unauthorized);
|
||||
} catch (const std::exception& e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue