fix: Server error when invalid 'sort' field is passed from an API client (#2000)
This commit is contained in:
@ -22,6 +22,7 @@ router.post("events.list", auth(), pagination(), async (ctx) => {
|
||||
auditLog = false,
|
||||
} = ctx.body;
|
||||
if (direction !== "ASC") direction = "DESC";
|
||||
ctx.assertSort(sort, Event);
|
||||
|
||||
let where = {
|
||||
name: Event.ACTIVITY_EVENTS,
|
||||
|
Reference in New Issue
Block a user