Add JWT auth and .env support for admin login

This commit is contained in:
2025-05-17 20:47:04 +03:30
parent 0d9cf11687
commit 9565c06fba
8 changed files with 37 additions and 789 deletions
+1 -1
View File
@@ -18,9 +18,9 @@ func SetupRouter() *gin.Engine {
AllowCredentials: true,
}))
auth.InitJwtTokenGenerator() // Must be befor initializing admin handler, otherwise 'panic: runtime error: invalid memory address or nil pointer dereference'
handlers.InitAdminDashboardHandler()
handlers.InitApiEndpointHandler()
auth.InitJwtTokenGenerator()
admin := r.Group("/admin")