From 92ff358e3a10244befbd8ea7ec7c067a4805ff75 Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Sat, 15 Jan 2022 12:33:34 -0800 Subject: [PATCH] update/update-auth-checks --- controllers/authController.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/controllers/authController.go b/controllers/authController.go index 9ce7745..b30218b 100644 --- a/controllers/authController.go +++ b/controllers/authController.go @@ -375,9 +375,9 @@ func StudentLogin(c *fiber.Ctx) error { update_time, _ := time.Parse(time.RFC3339, time.Now().Format(time.RFC3339)) update := bson.M{ "$set": bson.M{ - "accountdisabled": true, - "attempts": 0, - "updated_at": update_time, + "AccountData.accountdisabled": true, + "AccountData.attempts": 0, + "updated_at": update_time, }, } @@ -409,8 +409,8 @@ func StudentLogin(c *fiber.Ctx) error { update_time, _ := time.Parse(time.RFC3339, time.Now().Format(time.RFC3339)) update := bson.M{ "$set": bson.M{ - "attempts": student.AccountData.Attempts + 1, - "updated_at": update_time, + "AccountData.attempts": student.AccountData.Attempts + 1, + "updated_at": update_time, }, }