🐛 Fix bugs in updating notification preferences
This commit is contained in:
parent
f287e295e5
commit
5203234c4a
@ -28,6 +28,10 @@ func UpdateNotificationPreference(account models.Account, config map[string]bool
|
|||||||
lo.MapValues(config, func(v bool, k string) any { return v }),
|
lo.MapValues(config, func(v bool, k string) any { return v }),
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
notification.Config = datatypes.JSONMap(
|
||||||
|
lo.MapValues(config, func(v bool, k string) any { return v }),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
err = database.C.Save(¬ification).Error
|
err = database.C.Save(¬ification).Error
|
||||||
|
Loading…
Reference in New Issue
Block a user