simplify naming
This commit is contained in:
7 files changed
+58
-58
No files matched your search
@@ -369,10 +369,10 @@ func RemoveStudentsDisabled(c *fiber.Ctx) error {
|
||||
update_time, _ := time.Parse(time.RFC3339, time.Now().Format(time.RFC3339))
|
||||
update := bson.M{
|
||||
"$set": bson.M{
|
||||
"accountdata.accountdisabled": false,
|
||||
"accountdata.alerted": false,
|
||||
"accountdata.attempts": 0,
|
||||
"updated_at": update_time,
|
||||
"Account.accountdisabled": false,
|
||||
"Account.alerted": false,
|
||||
"Account.attempts": 0,
|
||||
"updated_at": update_time,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -432,9 +432,9 @@ func RemoveTeachersDisabled(c *fiber.Ctx) error {
|
||||
update_time, _ := time.Parse(time.RFC3339, time.Now().Format(time.RFC3339))
|
||||
update := bson.M{
|
||||
"$set": bson.M{
|
||||
"accountdata.accountdisabled": false,
|
||||
"accountdata.attempts": 0,
|
||||
"updated_at": update_time,
|
||||
"Account.accountdisabled": false,
|
||||
"Account.attempts": 0,
|
||||
"updated_at": update_time,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -161,12 +161,12 @@ func UpdateTeacherPassword(c *fiber.Ctx) error {
|
||||
update_time, _ := time.Parse(time.RFC3339, time.Now().Format(time.RFC3339))
|
||||
update := bson.M{
|
||||
"$set": bson.M{
|
||||
"accountdata.password": teacher.HashPassword(data["newpassword1"]),
|
||||
"accountdata.temppassword": false, // If it were a temp password, its not now
|
||||
"updated_at": update_time,
|
||||
"Account.password": teacher.HashPassword(data["newpassword1"]),
|
||||
"Account.temppassword": false, // If it were a temp password, its not now
|
||||
"updated_at": update_time,
|
||||
},
|
||||
"$push": bson.M{
|
||||
"accountdata.hashhistory": teacher.HashPassword(data["newpassword1"]),
|
||||
"Account.hashhistory": teacher.HashPassword(data["newpassword1"]),
|
||||
},
|
||||
}
|
||||
|
||||
@@ -246,9 +246,9 @@ func ResetTeacherPassword(c *fiber.Ctx) error {
|
||||
update_time, _ := time.Parse(time.RFC3339, time.Now().Format(time.RFC3339))
|
||||
update := bson.M{
|
||||
"$set": bson.M{
|
||||
"accountdata.password": teacher.HashPassword(tempPass),
|
||||
"accountdata.temppassword": true,
|
||||
"updated_at": update_time,
|
||||
"Account.password": teacher.HashPassword(tempPass),
|
||||
"Account.temppassword": true,
|
||||
"updated_at": update_time,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user