From 54c7a6669fb6cc2ec38d0be132d336a46bd6f38c Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Sat, 19 Feb 2022 16:28:53 -0800 Subject: [PATCH] update/404 not found handler --- routes/routes.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/routes/routes.go b/routes/routes.go index 1f5f591..7f6fca6 100644 --- a/routes/routes.go +++ b/routes/routes.go @@ -66,4 +66,9 @@ func Setup(app *fiber.App) { app.Post(routerPrefix+"/admin/updateLockerCombo", controllers.UpdateLockerCombo) app.Post(routerPrefix+"/admin/renableStudent", controllers.RemoveStudentsDisabled) app.Post(routerPrefix+"/admin/renableTeacher", controllers.RemoveTeachersDisabled) + + // 404 Handler + app.Use(func(c *fiber.Ctx) error { + return c.SendStatus(404) // => 404 "Not Found" + }) }