2022-05-09 09:49:11 +02:00

18 lines
266 B
Go

package photosapi
import (
"net/http"
"github.com/gin-gonic/gin"
)
func (s *Service) Me(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{
"user": s.CurrentSession(c).Account.Login,
})
}
func (s *Service) MeInit() {
s.Gin.GET("/me", s.RequireSession, s.Me)
}