diff --git a/main.go b/main.go index 90c72bd..2741c87 100644 --- a/main.go +++ b/main.go @@ -11,7 +11,7 @@ import ( "github.com/gofiber/fiber/v2/middleware/cors" ) -const version string = "\nv0.8.4-Alpha" +const version string = "\nv0.8.5-Alpha" func main() { fmt.Println(version) diff --git a/routes/routes.go b/routes/routes.go index 01c7870..582b358 100644 --- a/routes/routes.go +++ b/routes/routes.go @@ -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)