This commit is contained in:
luying
2022-04-11 20:32:08 +08:00
parent d4a103a6b1
commit c6ebb62c6a
14 changed files with 124 additions and 49 deletions
-19
View File
@@ -263,23 +263,4 @@ export default class Game extends Service {
}), total
});
}
public async updateSurvey(param: any) {
const { ctx } = this;
try {
let reward = JSON.parse(param.goods);
let result = await SurveyModel.updateSurvey(param.code, {...param, reward});
if(!result) return ctx.service.utils.resResult(STATUS.WRONG_PARMS);
return ctx.service.utils.resResult(STATUS.SUCCESS);
} catch(e) {
return ctx.service.utils.resResult(STATUS.WRONG_PARMS);
}
}
public async deleteSurvey(code: string) {
const { ctx } = this;
await SurveyModel.deleteSurvey(code);
return ctx.service.utils.resResult(STATUS.SUCCESS);
}
}