From c3492128b5e440aaa7a10d893a170dac82f75ab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D0=BE=D0=BB=D0=B8=D0=BA=D0=BE=D0=B2=20Maximillian?= =?UTF-8?q?=20=D0=90=D0=BD=D1=82=D0=BE=D0=BD?= Date: Fri, 2 Oct 2026 10:36:02 +0300 Subject: [PATCH] feat(router): expose /auth/sessions endpoints --- backend/internal/httpapi/router.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/internal/httpapi/router.go b/backend/internal/httpapi/router.go index 48a78a7..d45c936 100644 --- a/backend/internal/httpapi/router.go +++ b/backend/internal/httpapi/router.go @@ -12,6 +12,7 @@ type Handlers struct { User *handler.UserHandler Chat *handler.ChatHandler Message *handler.MessageHandler + Auth *handler.AuthHandler } func NewRouter(h Handlers, auth gin.HandlerFunc) *gin.Engine { @@ -28,11 +29,14 @@ func NewRouter(h Handlers, auth gin.HandlerFunc) *gin.Engine { api := r.Group("/api/v1") { api.POST("/users", h.User.Create) + api.POST("/auth/sessions", h.Auth.CreateSession) } protected := api.Group("") protected.Use(auth) { + protected.DELETE("/auth/sessions/current", h.Auth.RevokeCurrent) + protected.GET("/users/me", h.User.Current) protected.POST("/chats", h.Chat.Create) protected.GET("/chats", h.Chat.List)