mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
API: Add missing Swagger endpoint annotations and update swagger.json
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -12,11 +12,17 @@ import (
|
||||
"github.com/photoprism/photoprism/pkg/service/http/header"
|
||||
)
|
||||
|
||||
// GetSession returns the session data as JSON if authentication was successful.
|
||||
// GetSession returns session data for the current or specified session.
|
||||
//
|
||||
// GET /api/v1/session
|
||||
// GET /api/v1/session/:id
|
||||
// GET /api/v1/sessions/:id
|
||||
// @Summary get the current session or a session by id
|
||||
// @Tags Authentication
|
||||
// @Produce json
|
||||
// @Param id path string false "session id"
|
||||
// @Success 200 {object} gin.H
|
||||
// @Failure 401,403,404,429 {object} i18n.Response
|
||||
// @Router /api/v1/session [get]
|
||||
// @Router /api/v1/session/{id} [get]
|
||||
// @Router /api/v1/sessions/{id} [get]
|
||||
func GetSession(router *gin.RouterGroup) {
|
||||
getSessionHandler := func(c *gin.Context) {
|
||||
// Prevent CDNs from caching this endpoint.
|
||||
|
||||
Reference in New Issue
Block a user