Settings: Prevent success notification from being displayed twice
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
parent
5cfe8720be
commit
290617c082
2 changed files with 0 additions and 10 deletions
|
@ -10,9 +10,7 @@ import (
|
|||
|
||||
"github.com/photoprism/photoprism/internal/acl"
|
||||
"github.com/photoprism/photoprism/internal/entity"
|
||||
"github.com/photoprism/photoprism/internal/event"
|
||||
"github.com/photoprism/photoprism/internal/get"
|
||||
"github.com/photoprism/photoprism/internal/i18n"
|
||||
"github.com/photoprism/photoprism/pkg/clean"
|
||||
"github.com/photoprism/photoprism/pkg/fs"
|
||||
)
|
||||
|
@ -118,9 +116,6 @@ func SaveConfigOptions(router *gin.RouterGroup) {
|
|||
entity.FlushSessionCache()
|
||||
UpdateClientConfig()
|
||||
|
||||
// Show info message.
|
||||
event.InfoMsg(i18n.MsgSettingsSaved)
|
||||
|
||||
// Return updated config options.
|
||||
c.JSON(http.StatusOK, conf.Options())
|
||||
})
|
||||
|
|
|
@ -8,7 +8,6 @@ import (
|
|||
"github.com/photoprism/photoprism/internal/acl"
|
||||
"github.com/photoprism/photoprism/internal/customize"
|
||||
"github.com/photoprism/photoprism/internal/entity"
|
||||
"github.com/photoprism/photoprism/internal/event"
|
||||
"github.com/photoprism/photoprism/internal/get"
|
||||
"github.com/photoprism/photoprism/internal/i18n"
|
||||
)
|
||||
|
@ -93,7 +92,6 @@ func SaveSettings(router *gin.RouterGroup) {
|
|||
}
|
||||
|
||||
if acl.Resources.DenyAll(acl.ResourceSettings, s.User().AclRole(), acl.Permissions{acl.ActionUpdate, acl.ActionManage}) {
|
||||
event.InfoMsg(i18n.MsgSettingsSaved)
|
||||
c.JSON(http.StatusOK, user.Settings().Apply(settings).ApplyTo(conf.Settings().ApplyACL(acl.Resources, user.AclRole())))
|
||||
return
|
||||
} else if err := user.Settings().Apply(settings).Save(); err != nil {
|
||||
|
@ -103,9 +101,6 @@ func SaveSettings(router *gin.RouterGroup) {
|
|||
}
|
||||
}
|
||||
|
||||
// Show info message.
|
||||
event.InfoMsg(i18n.MsgSettingsSaved)
|
||||
|
||||
// Return updated user settings.
|
||||
c.JSON(http.StatusOK, get.Config().SessionSettings(s))
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue