replace aid, tid and sid with uid for general user-id input

This commit is contained in:
SowinskiBraeden committed 2023-01-09 18:22:00 -08:00
1 parent fede9ff793
commit a092e82f7f
5 files changed
+80 -80

No files matched your search

+4 -4
View File
@@ -358,7 +358,7 @@ func RemoveStudentsDisabled(c *fiber.Ctx) error {
}
// Check required fields are included
if data["sid"] == "" {
if data["uid"] == "" {
cancel()
return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{
"success": false,
@@ -378,7 +378,7 @@ func RemoveStudentsDisabled(c *fiber.Ctx) error {
result, updateErr := StudentCollection.UpdateOne(
ctx,
bson.M{"school.sid": data["sid"]},
bson.M{"school.sid": data["uid"]},
update,
)
if updateErr != nil {
@@ -421,7 +421,7 @@ func RemoveTeachersDisabled(c *fiber.Ctx) error {
}
// Check required fields are included
if data["tid"] == "" {
if data["uid"] == "" {
cancel()
return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{
"success": false,
@@ -440,7 +440,7 @@ func RemoveTeachersDisabled(c *fiber.Ctx) error {
result, updateErr := TeacherCollection.UpdateOne(
ctx,
bson.M{"school.tid": data["tid"]},
bson.M{"school.tid": data["uid"]},
update,
)
if updateErr != nil {