增加重置totp的命令

This commit is contained in:
dushixiang
2021-04-14 22:27:12 +08:00
parent 5cee2dd50e
commit 11f2d8a1f4
4 changed files with 54 additions and 4 deletions

View File

@ -39,7 +39,10 @@ func Run() error {
e := api.SetupRoutes(db)
if global.Config.ResetPassword != "" {
return api.ResetPassword()
return api.ResetPassword(global.Config.ResetPassword)
}
if global.Config.ResetTotp != "" {
return api.ResetTotp(global.Config.ResetTotp)
}
sessionRepo := repository.NewSessionRepository(db)
propertyRepo := repository.NewPropertyRepository(db)