@azteam/express 1.2.240 → 1.2.241
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 +3 -3
package/package.json
CHANGED
package/src/AdminController.js
CHANGED
|
@@ -179,7 +179,7 @@ class AdminController extends Controller {
|
|
|
179
179
|
adminRoleMiddleware([this.roles.UPDATE]),
|
|
180
180
|
validateMiddleware(REQUEST_TYPE.PARAMS, rulesId),
|
|
181
181
|
async (req, res) => {
|
|
182
|
-
|
|
182
|
+
let item = await this.repository.findOneById(req.params.id);
|
|
183
183
|
if (!item) return res.error(NOT_EXISTS);
|
|
184
184
|
|
|
185
185
|
await item.modifyStatusAvailable(req.user.id);
|
|
@@ -200,7 +200,7 @@ class AdminController extends Controller {
|
|
|
200
200
|
adminRoleMiddleware([this.roles.UPDATE]),
|
|
201
201
|
validateMiddleware(REQUEST_TYPE.PARAMS, rulesId),
|
|
202
202
|
async (req, res) => {
|
|
203
|
-
|
|
203
|
+
let item = await this.repository.findOneById(req.params.id);
|
|
204
204
|
if (!item) return res.error(NOT_EXISTS);
|
|
205
205
|
|
|
206
206
|
await item.modifyStatusUnavailable(req.body.message, req.user.id);
|
|
@@ -221,7 +221,7 @@ class AdminController extends Controller {
|
|
|
221
221
|
adminRoleMiddleware([this.roles.UPDATE]),
|
|
222
222
|
validateMiddleware(REQUEST_TYPE.PARAMS, rulesId),
|
|
223
223
|
async (req, res) => {
|
|
224
|
-
|
|
224
|
+
let item = await this.repository.findOneById(req.params.id);
|
|
225
225
|
if (!item) return res.error(NOT_EXISTS);
|
|
226
226
|
|
|
227
227
|
await item.modifyStatusWaiting(req.user.id);
|