simplify naming

This commit is contained in:
SowinskiBraeden committed 2023-01-07 17:14:00 -08:00
1 parent 4c4bad4be0
commit b140869281
7 files changed
+58 -58

No files matched your search

+7 -7
View File
@@ -306,12 +306,12 @@ func UpdateStudentPassword(c *fiber.Ctx) error {
update_time, _ := time.Parse(time.RFC3339, time.Now().Format(time.RFC3339))
update := bson.M{
"$set": bson.M{
"accountdata.password": student.HashPassword(data["newpassword1"]),
"accountdata.temppassword": false, // If it were a temp password, its not now
"updated_at": update_time,
"Account.password": student.HashPassword(data["newpassword1"]),
"Account.temppassword": false, // If it were a temp password, its not now
"updated_at": update_time,
},
"$push": bson.M{
"accountdata.hashhistory": student.HashPassword(data["newpassword1"]),
"Account.hashhistory": student.HashPassword(data["newpassword1"]),
},
}
@@ -393,9 +393,9 @@ func ResetStudentPassword(c *fiber.Ctx) error {
update_time, _ := time.Parse(time.RFC3339, time.Now().Format(time.RFC3339))
update := bson.M{
"$set": bson.M{
"accountdata.password": student.HashPassword(tempPass),
"accountdata.temppassword": true,
"updated_at": update_time,
"Account.password": student.HashPassword(tempPass),
"Account.temppassword": true,
"updated_at": update_time,
},
}