feat: add validator for jwt

This commit is contained in:
d3m0k1d
2026-02-14 21:51:44 +03:00
parent 4712604171
commit 2b794f97a3
6 changed files with 183 additions and 6 deletions

View File

@@ -15,6 +15,7 @@ func Register(router *gin.Engine, db *sql.DB) {
v1 := router.Group("api/v1")
v1.GET("/callback/github", handler_auth.CallbackGithub)
v1.GET("/auth/github", handler_auth.LoginGithub)
v1.GET("/session", auth.JWTMiddleware(), handler_auth.GetSession)
posts := v1.Group("posts")
{