added redirect to completed form on form submission
This commit is contained in:
@@ -59,8 +59,8 @@ eventRouter.post('/', async (req: Request, res: Response) => {
|
||||
try {
|
||||
console.log();
|
||||
const data: CourseEventDetails = req.body;
|
||||
await insertCourseEvent(data);
|
||||
res.sendStatus(201);
|
||||
const id = await insertCourseEvent(data);
|
||||
res.status(201).json(id);
|
||||
} catch (error) {
|
||||
console.error('failed to post training', error);
|
||||
res.status(500).json("failed to post training\n" + error)
|
||||
|
||||
Reference in New Issue
Block a user