feat(app) lab2 prepared for mr

This commit is contained in:
imadev
2026-10-23 18:55:20 +03:00
parent 1db3953226
commit f6e74247fd
57 changed files with 2367 additions and 660 deletions
+17
View File
@@ -0,0 +1,17 @@
package auth
import (
"gitflic.ru/project/bulla-max/mtusi2026lab2/internal/session"
"gitflic.ru/project/bulla-max/mtusi2026lab2/internal/store"
"github.com/gofiber/fiber/v3"
)
func RegisterPublicRoutes(router fiber.Router, st *store.Store, sessions *session.Store) {
handler := NewHandler(st, sessions)
router.Post("/auth/sessions", handler.CreateSession)
}
func RegisterRoutes(router fiber.Router, st *store.Store, sessions *session.Store) {
handler := NewHandler(st, sessions)
router.Delete("/auth/sessions/current", handler.RevokeSession)
}