remove deprecated test response

This commit is contained in:
SowinskiBraeden authored and GitHub committed 2022-06-10 12:28:50 -07:00
1 parent e97f185e22
commit 596533753c
1 file changed
+9 -2
+9 -2
View File
@@ -320,7 +320,7 @@ func UpdateStudentPassword(c *fiber.Ctx) error {
}, },
} }
result, updateErr := studentCollection.UpdateOne( _, updateErr := studentCollection.UpdateOne(
ctx, ctx,
bson.M{"schooldata.sid": claims.Issuer}, bson.M{"schooldata.sid": claims.Issuer},
update, update,
@@ -350,7 +350,6 @@ func UpdateStudentPassword(c *fiber.Ctx) error {
return c.Status(fiber.StatusOK).JSON(fiber.Map{ return c.Status(fiber.StatusOK).JSON(fiber.Map{
"success": true, "success": true,
"message": "successfully updated student password", "message": "successfully updated student password",
"result": result,
}) })
} }
@@ -935,6 +934,14 @@ func UpdateStudentEmail(c *fiber.Ctx) error {
}) })
} }
if verifiedAdmin && data["sid"] == "" {
cancel()
return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{
"success": false,
"message": "missing required fields",
})
}
// Check required fields are included // Check required fields are included
if data["email"] == "" { if data["email"] == "" {
cancel() cancel()