add account list page and account add page

This commit is contained in:
MaysWind
2020-11-09 01:10:41 +08:00
parent 70d4a84349
commit b2b8dcb098
15 changed files with 753 additions and 6 deletions
+1
View File
@@ -31,6 +31,7 @@ func updateDatabaseStructure(c *cli.Context) error {
_ = datastore.Container.UserStore.SyncStructs(new(models.User), new(models.TwoFactor), new(models.TwoFactorRecoveryCode))
_ = datastore.Container.TokenStore.SyncStructs(new(models.TokenRecord))
_ = datastore.Container.UserDataStore.SyncStructs(new(models.Account))
log.BootInfof("[database.updateDatabaseStructure] maintained successfully")
+4
View File
@@ -157,6 +157,10 @@ func startWebServer(c *cli.Context) error {
apiV1Route.POST("/users/2fa/disable.json", bindApi(api.TwoFactorAuthorizations.TwoFactorDisableHandler))
apiV1Route.POST("/users/2fa/recovery/regenerate.json", bindApi(api.TwoFactorAuthorizations.TwoFactorRecoveryCodeRegenerateHandler))
}
// Accounts
apiV1Route.GET("/accounts/list.json", bindApi(api.Accounts.AccountListHandler))
apiV1Route.POST("/accounts/add.json", bindApi(api.Accounts.AccountCreateHandler))
}
}