feat: 修改参数不正确报错
This commit is contained in:
parent
2189eb3d22
commit
a5334a6632
@ -5,6 +5,7 @@ import { surveyHistoryService } from './service/surveyHistoryService';
|
|||||||
import { HISTORY_TYPE } from '../../types/index';
|
import { HISTORY_TYPE } from '../../types/index';
|
||||||
import { getValidateValue } from './utils/index';
|
import { getValidateValue } from './utils/index';
|
||||||
import * as Joi from 'joi';
|
import * as Joi from 'joi';
|
||||||
|
import { CommonError } from '../../types/index';
|
||||||
|
|
||||||
type FilterItem = {
|
type FilterItem = {
|
||||||
comparator?: string;
|
comparator?: string;
|
||||||
@ -115,14 +116,14 @@ export default class SurveyManage {
|
|||||||
try {
|
try {
|
||||||
filter = this.getFilter(JSON.parse(condition.filter));
|
filter = this.getFilter(JSON.parse(condition.filter));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
throw new CommonError('filter参数格式不正确');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (condition.order) {
|
if (condition.order) {
|
||||||
try {
|
try {
|
||||||
order = this.getOrder(JSON.parse(condition.order));
|
order = this.getOrder(JSON.parse(condition.order));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
throw new CommonError('order参数格式不正确');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const userData = await userService.checkLogin({ req });
|
const userData = await userService.checkLogin({ req });
|
||||||
|
Loading…
Reference in New Issue
Block a user