From 9d44f98ff119376d6112c0bb6f491ddbb8dcd270 Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Sat, 28 May 2022 11:09:45 -0700 Subject: [PATCH] block dashboard on disabled account --- controllers/authController.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/controllers/authController.go b/controllers/authController.go index c188f8f..807011c 100644 --- a/controllers/authController.go +++ b/controllers/authController.go @@ -836,6 +836,13 @@ func Student(c *fiber.Ctx) error { }) } + if student.AccountData.AccountDisabled { + return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{ + "success": false, + "message": "Student Accound Disabled, Contact and Admin", + }) + } + responseData["student"] = student var locker models.Locker