@azteam/express 1.2.237 → 1.2.238
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/AdminController.js +19 -0
package/package.json
CHANGED
package/src/AdminController.js
CHANGED
|
@@ -209,6 +209,25 @@ class AdminController extends Controller {
|
|
|
209
209
|
};
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
+
putModifyStatusWaitingPublic() {
|
|
213
|
+
return {
|
|
214
|
+
disabled: !this.roles.UPDATE,
|
|
215
|
+
path: '/waiting/:id',
|
|
216
|
+
method: [
|
|
217
|
+
adminRoleMiddleware([this.roles.UPDATE]),
|
|
218
|
+
validateMiddleware(REQUEST_TYPE.PARAMS, rulesId),
|
|
219
|
+
async (req, res) => {
|
|
220
|
+
const item = await this.repository.findOneById(req.params.id);
|
|
221
|
+
if (!item) return res.error(NOT_EXISTS);
|
|
222
|
+
|
|
223
|
+
await item.modifyStatusWaiting(req.body.message, req.user.id);
|
|
224
|
+
|
|
225
|
+
return res.success(item, this.guardResponse, this.allowResponse);
|
|
226
|
+
},
|
|
227
|
+
],
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
|
|
212
231
|
async afterDelete(item) {
|
|
213
232
|
return item;
|
|
214
233
|
}
|