Integrated "created by" system
This commit is contained in:
@@ -56,9 +56,11 @@ eventRouter.get('/attendees/:id', async (req: Request, res: Response) => {
|
||||
})
|
||||
|
||||
eventRouter.post('/', async (req: Request, res: Response) => {
|
||||
const posterID: number = req.user.id;
|
||||
try {
|
||||
console.log();
|
||||
const data: CourseEventDetails = req.body;
|
||||
let data: CourseEventDetails = req.body;
|
||||
data.created_by = posterID;
|
||||
const id = await insertCourseEvent(data);
|
||||
res.status(201).json(id);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user