update/student-locker-info
This commit is contained in:
1 parent
92ff358e3a
commit
1078b4f78a
3 files changed
+80
-5
No files matched your search
@@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user