From af85e1949e2a8c27b7c38f0295341b7c17622f36 Mon Sep 17 00:00:00 2001 From: JTrenerry Date: Thu, 2 May 2024 15:19:24 +1000 Subject: [PATCH] hopefully the last one Co-authored-by: liv 82008326+vilnor@users.noreply.github.com --- backend/routes/routes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/routes/routes.ts b/backend/routes/routes.ts index b917049..d704797 100644 --- a/backend/routes/routes.ts +++ b/backend/routes/routes.ts @@ -230,7 +230,7 @@ router.post('/exams', async (req: Request, res: Response) => { }); // Adds a new Course to the database -router.get('/courses', async (req: Request, res: Response) => { +router.post('/courses', async (req: Request, res: Response) => { const { courseCode, courseName, courseDescription } = req.body; const r = await db.query(`SELECT courseCode FROM courses WHERE courseCode = $1`, [courseCode]); if (r.rowCount !== 0) {