问卷
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user