Merge commit from fork

* Harden user setting cache updates

* Fix user update test isolation
This commit is contained in:
Calcium-Ion
2026-07-03 15:25:33 +08:00
committed by GitHub
parent bfddc5fea0
commit dfc0d6324b
6 changed files with 161 additions and 29 deletions
+1 -2
View File
@@ -89,8 +89,7 @@ func UpdateSubscriptionPreference(c *gin.Context) {
}
current := user.GetSetting()
current.BillingPreference = pref
user.SetSetting(current)
if err := user.Update(false); err != nil {
if err := model.UpdateUserSetting(user.Id, current); err != nil {
common.ApiError(c, err)
return
}