ombi: fix password reset on default route
the ombi password wasn't being changed w/ password resets initiated through the admin page (and probably by other routes, too), as the code was considering a HTTP 204 from Jellyfin as a failure, causing it to skip anything with Ombi. Also added a little check for Ombi-imported accounts that probably won't help with anything, but whatever.
This commit is contained in:
+15
@@ -132,3 +132,18 @@ func (app *appContext) DeleteOmbiProfile(gc *gin.Context) {
|
||||
app.storage.SetProfileKey(profileName, profile)
|
||||
respondBool(204, true, gc)
|
||||
}
|
||||
|
||||
func (app *appContext) applyOmbiProfile(user map[string]interface{}, profile map[string]interface{}) (status int, err error) {
|
||||
for k, v := range profile {
|
||||
switch v.(type) {
|
||||
case map[string]interface{}, []interface{}:
|
||||
user[k] = v
|
||||
default:
|
||||
if v != user[k] {
|
||||
user[k] = v
|
||||
}
|
||||
}
|
||||
}
|
||||
status, err = app.ombi.ModifyUser(user)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user