perf: sha256 for user's password (close #3552)

This commit is contained in:
Andy Hsu
2023-08-06 22:09:17 +08:00
parent 30415cefbe
commit 75acbcc115
4 changed files with 62 additions and 16 deletions

View File

@ -46,6 +46,7 @@ func Init(e *gin.Engine) {
auth := api.Group("", middlewares.Auth)
api.POST("/auth/login", handles.Login)
api.POST("/auth/login/hash", handles.LoginHash)
auth.GET("/me", handles.CurrentUser)
auth.POST("/me/update", handles.UpdateCurrent)
auth.POST("/auth/2fa/generate", handles.Generate2FA)