update/student-locker-info

This commit is contained in:
SowinskiBraeden committed 2022-01-18 16:41:29 -08:00
1 parent 92ff358e3a
commit 1078b4f78a
3 files changed
+80 -5

No files matched your search

+6
View File
@@ -624,10 +624,16 @@ func Student(c *fiber.Ctx) error {
})
}
var locker models.Locker
if student.SchoolData.Locker != "" {
lockerCollection.FindOne(context.TODO(), bson.M{"ID": student.SchoolData.Locker}).Decode(&locker)
}
return c.Status(fiber.StatusAccepted).JSON(fiber.Map{
"success": true,
"message": "successfully logged into student",
"result": student,
"locker": locker,
})
}