mirror of
https://github.com/YMFE/yapi.git
synced 2025-02-11 13:40:32 +08:00
fix: 修改soar 改动的bug
This commit is contained in:
parent
35d96b334f
commit
b97474cfaf
@ -478,8 +478,8 @@ class interfaceController extends baseController {
|
||||
try {
|
||||
let id = parseInt(ctx.query.id, 10), result, userInst, userinfo, data;
|
||||
if (!id) return ctx.websocket.send("id 参数有误");
|
||||
await this.Model.get(id);
|
||||
result = userinfo;
|
||||
result = await this.Model.get(id);
|
||||
|
||||
if (result.edit_uid !== 0 && result.edit_uid !== this.getUid()) {
|
||||
userInst = yapi.getInst(userModel);
|
||||
userinfo = await userInst.findById(result.edit_uid);
|
||||
@ -604,8 +604,7 @@ class interfaceController extends baseController {
|
||||
typeid: catData.project_id
|
||||
});
|
||||
|
||||
// no used variable 'result'
|
||||
// let result = await this.catModel.del(id);
|
||||
await this.catModel.del(id);
|
||||
let r = await this.Model.delByCatid(id);
|
||||
return ctx.body = yapi.commons.resReturn(r);
|
||||
} catch (e) {
|
||||
|
Loading…
Reference in New Issue
Block a user