remove unused code
This commit is contained in:
@@ -151,8 +151,6 @@ func startWebServer(c *cli.Context) error {
|
||||
|
||||
if config.EnableUserRegister {
|
||||
apiRoute.POST("/register.json", bindApi(api.Users.UserRegisterHandler))
|
||||
} else {
|
||||
apiRoute.POST("/register.json", bindApi(api.Users.UserRegistrationNotAllowed))
|
||||
}
|
||||
|
||||
if config.EnableDataExport {
|
||||
|
||||
+1
-6
@@ -29,7 +29,7 @@ var (
|
||||
// UserRegisterHandler saves a new user by request parameters
|
||||
func (a *UsersApi) UserRegisterHandler(c *core.Context) (interface{}, *errs.Error) {
|
||||
if !settings.Container.Current.EnableUserRegister {
|
||||
return a.UserRegistrationNotAllowed(c)
|
||||
return nil, errs.ErrUserRegistrationNotAllowed
|
||||
}
|
||||
|
||||
var userRegisterReq models.UserRegisterRequest
|
||||
@@ -81,11 +81,6 @@ func (a *UsersApi) UserRegisterHandler(c *core.Context) (interface{}, *errs.Erro
|
||||
return authResp, nil
|
||||
}
|
||||
|
||||
// UserRegistrationNotAllowed returns user registration not allowed error
|
||||
func (a *UsersApi) UserRegistrationNotAllowed(c *core.Context) (interface{}, *errs.Error) {
|
||||
return nil, errs.ErrUserRegistrationNotAllowed
|
||||
}
|
||||
|
||||
// UserProfileHandler returns user profile of current user
|
||||
func (a *UsersApi) UserProfileHandler(c *core.Context) (interface{}, *errs.Error) {
|
||||
uid := c.GetCurrentUid()
|
||||
|
||||
Reference in New Issue
Block a user