Skip to content

Commit

Permalink
fix: login don't need auth
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Jul 7, 2022
1 parent 9ba7cf0 commit 156da2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
File renamed without changes.
3 changes: 2 additions & 1 deletion server/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ func Init(r *gin.Engine) {
r.GET("/d/*path", middlewares.Down, controllers.Down)
r.GET("/p/*path", middlewares.Down, controllers.Proxy)

r.POST("/api/auth/login", controllers.Login)

api := r.Group("/api", middlewares.Auth)
api.POST("/auth/login", controllers.Login)
api.GET("/auth/current", controllers.CurrentUser)

admin := api.Group("/admin", middlewares.AuthAdmin)
Expand Down

0 comments on commit 156da2b

Please sign in to comment.