mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Add Websocket authentication #216
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/photoprism/photoprism/internal/config"
|
||||
"github.com/photoprism/photoprism/internal/event"
|
||||
"github.com/photoprism/photoprism/internal/form"
|
||||
"github.com/photoprism/photoprism/internal/session"
|
||||
"github.com/photoprism/photoprism/pkg/txt"
|
||||
@@ -33,6 +34,8 @@ func CreateSession(router *gin.RouterGroup, conf *config.Config) {
|
||||
|
||||
s := gin.H{"token": token, "user": user}
|
||||
|
||||
event.Publish("config.updated", event.Data(conf.ClientConfig()))
|
||||
|
||||
c.JSON(http.StatusOK, s)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user