mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
This commit also adds an /api/v1/oauth/logout endpoint that allows clients to delete their sessions (access tokens) as needed. Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
||||
//
|
||||
// GET /api/v1/session/:id
|
||||
func GetSession(router *gin.RouterGroup) {
|
||||
router.GET("/session/:id", func(c *gin.Context) {
|
||||
getSessionHandler := func(c *gin.Context) {
|
||||
id := clean.ID(c.Param("id"))
|
||||
|
||||
// Check authentication token.
|
||||
@@ -60,5 +60,7 @@ func GetSession(router *gin.RouterGroup) {
|
||||
|
||||
// Return JSON response.
|
||||
c.JSON(http.StatusOK, response)
|
||||
})
|
||||
}
|
||||
|
||||
router.GET("/session/:id", getSessionHandler)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user