accounts: invalidate web user cache on changes as well

previously used app.jf.CacheExpiry = time.Now(), now either call
app.InvalidateJellyfinCache() (when we only need it to get a user),
or app.InvalidateUserCaches() (when the web user list needs to be
updated).
This commit is contained in:
Harvey Tindall
2025-05-27 15:22:24 +01:00
parent 30acc4f9b8
commit d8e624ad22
6 changed files with 21 additions and 10 deletions

View File

@@ -110,7 +110,7 @@ func (app *appContext) SetDefaultProfile(gc *gin.Context) {
func (app *appContext) CreateProfile(gc *gin.Context) {
var req newProfileDTO
gc.BindJSON(&req)
app.jf.CacheExpiry = time.Now()
app.InvalidateJellyfinCache()
user, err := app.jf.UserByID(req.ID, false)
if err != nil {
app.err.Printf(lm.FailedGetUsers, lm.Jellyfin, err)