Browse Source

fix(nocodb): return error for hook test

pull/5349/head
Wing-Kam Wong 2 years ago
parent
commit
3680378e54
  1. 12
      packages/nocodb/src/lib/controllers/hook.ctl.ts

12
packages/nocodb/src/lib/controllers/hook.ctl.ts

@ -46,11 +46,21 @@ export async function hookUpdate(
}
export async function hookTest(req: Request<any, any>, res: Response) {
try {
await hookService.hookTest({
hookTest: req.body,
hookTest: {
...req.body,
payload: {
...req.body.payload,
user: (req as any)?.user,
},
},
tableId: req.params.tableId,
});
res.json({ msg: 'The hook has been tested successfully' });
} catch (e) {
throw e;
}
}
export async function tableSampleData(req: Request, res: Response) {

Loading…
Cancel
Save