support custom first day of week

This commit is contained in:
MaysWind
2021-01-31 20:09:03 +08:00
parent e06fba3f8b
commit 61267af634
15 changed files with 262 additions and 81 deletions
+4
View File
@@ -194,6 +194,10 @@ func (s *UserService) UpdateUser(user *models.User) (keyProfileUpdated bool, err
updateCols = append(updateCols, "default_currency")
}
if models.WEEKDAY_SUNDAY <= user.FirstDayOfWeek && user.FirstDayOfWeek <= models.WEEKDAY_SATURDAY {
updateCols = append(updateCols, "first_day_of_week")
}
user.UpdatedUnixTime = now
updateCols = append(updateCols, "updated_unix_time")