diff --git a/app/apps/server/communication/rest.js b/app/apps/server/communication/rest.js index 4d3571aae4534..d8793a6d8ca4d 100644 --- a/app/apps/server/communication/rest.js +++ b/app/apps/server/communication/rest.js @@ -461,14 +461,12 @@ export class AppsRestApi { return API.v1.notFound(`No App found by the id of: ${ this.urlParams.id }`); } - manager.remove(prl.getID()) - .then(() => { - const info = prl.getInfo(); - info.status = prl.getStatus(); - - API.v1.success({ app: info }); - }) - .catch((err) => API.v1.failure(err)); + Promise.await(manager.remove(prl.getID())); + + const info = prl.getInfo(); + info.status = prl.getStatus(); + + return API.v1.success({ app: info }); }, });