mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Also improves migrations and updates the db schema docs. Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -6,12 +6,12 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"github.com/photoprism/photoprism/internal/event"
|
||||
"github.com/photoprism/photoprism/internal/service"
|
||||
"github.com/photoprism/photoprism/internal/get"
|
||||
)
|
||||
|
||||
// UpdateClientConfig publishes updated client configuration values over the websocket connections.
|
||||
func UpdateClientConfig() {
|
||||
event.Publish("config.updated", event.Data{"config": service.Config().ClientUser(false)})
|
||||
event.Publish("config.updated", event.Data{"config": get.Config().ClientUser(false)})
|
||||
}
|
||||
|
||||
// GetClientConfig returns the client configuration values as JSON.
|
||||
@@ -20,7 +20,7 @@ func UpdateClientConfig() {
|
||||
func GetClientConfig(router *gin.RouterGroup) {
|
||||
router.GET("/config", func(c *gin.Context) {
|
||||
s := Session(SessionID(c))
|
||||
conf := service.Config()
|
||||
conf := get.Config()
|
||||
|
||||
if s == nil {
|
||||
c.JSON(http.StatusOK, conf.ClientPublic())
|
||||
|
||||
Reference in New Issue
Block a user