add api check

This commit is contained in:
SowinskiBraeden committed 2022-05-21 15:18:25 -07:00
1 parent fbbb36e7d4
commit a1fffd12aa
2 files changed
+9 -1

No files matched your search

+8
View File
@@ -13,6 +13,14 @@ func Setup(app *fiber.App) {
// API Handling
var routerPrefix string = "/api/v1"
// API check
app.Get(routerPrefix+"/status", func(c *fiber.Ctx) error {
return c.Status(fiber.StatusOK).JSON(fiber.Map{
"success": true,
"message": "the API is active",
})
})
// Student Authentication Handler
app.Get(routerPrefix+"/student", controllers.Student)
app.Post(routerPrefix+"/student/enroll", controllers.Enroll)