chore: support deleting storage (#1095)

This commit is contained in:
boojack
2023-02-15 22:54:46 +08:00
committed by GitHub
parent e46f77681d
commit 7e8011ba34
11 changed files with 87 additions and 56 deletions

View File

@ -81,9 +81,8 @@ func (s *Server) registerAuthRoutes(g *echo.Group) {
// Change the default role to host if there is no host user.
userCreate.Role = api.Host
} else {
systemSettingAllowSignUpName := api.SystemSettingAllowSignUpName
allowSignUpSetting, err := s.Store.FindSystemSetting(ctx, &api.SystemSettingFind{
Name: &systemSettingAllowSignUpName,
Name: api.SystemSettingAllowSignUpName,
})
if err != nil && common.ErrorCode(err) != common.NotFound {
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to find system setting").SetInternal(err)