增加从环境变量获取配置&修复修改密码失败的bug&增加退出登录&修复新增用户无法登录的bug

This commit is contained in:
dushixiang
2020-12-26 23:56:02 +08:00
parent 712e2cfe84
commit 31e18d0418
24 changed files with 195 additions and 53 deletions

View File

@ -7,6 +7,16 @@ import (
"time"
)
func ErrorHandler(next echo.HandlerFunc) echo.HandlerFunc {
return func(c echo.Context) error {
if err := next(c); err != nil {
return Fail(c, 0, err.Error())
}
return nil
}
}
func Auth(next echo.HandlerFunc) echo.HandlerFunc {
urls := []string{"download", "recording", "login", "static", "favicon", "logo"}