mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-21 02:04:26 +08:00
remove unused code
This commit is contained in:
@@ -151,8 +151,6 @@ func startWebServer(c *cli.Context) error {
|
|||||||
|
|
||||||
if config.EnableUserRegister {
|
if config.EnableUserRegister {
|
||||||
apiRoute.POST("/register.json", bindApi(api.Users.UserRegisterHandler))
|
apiRoute.POST("/register.json", bindApi(api.Users.UserRegisterHandler))
|
||||||
} else {
|
|
||||||
apiRoute.POST("/register.json", bindApi(api.Users.UserRegistrationNotAllowed))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if config.EnableDataExport {
|
if config.EnableDataExport {
|
||||||
|
|||||||
+1
-6
@@ -29,7 +29,7 @@ var (
|
|||||||
// UserRegisterHandler saves a new user by request parameters
|
// UserRegisterHandler saves a new user by request parameters
|
||||||
func (a *UsersApi) UserRegisterHandler(c *core.Context) (interface{}, *errs.Error) {
|
func (a *UsersApi) UserRegisterHandler(c *core.Context) (interface{}, *errs.Error) {
|
||||||
if !settings.Container.Current.EnableUserRegister {
|
if !settings.Container.Current.EnableUserRegister {
|
||||||
return a.UserRegistrationNotAllowed(c)
|
return nil, errs.ErrUserRegistrationNotAllowed
|
||||||
}
|
}
|
||||||
|
|
||||||
var userRegisterReq models.UserRegisterRequest
|
var userRegisterReq models.UserRegisterRequest
|
||||||
@@ -81,11 +81,6 @@ func (a *UsersApi) UserRegisterHandler(c *core.Context) (interface{}, *errs.Erro
|
|||||||
return authResp, nil
|
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
|
// UserProfileHandler returns user profile of current user
|
||||||
func (a *UsersApi) UserProfileHandler(c *core.Context) (interface{}, *errs.Error) {
|
func (a *UsersApi) UserProfileHandler(c *core.Context) (interface{}, *errs.Error) {
|
||||||
uid := c.GetCurrentUid()
|
uid := c.GetCurrentUid()
|
||||||
|
|||||||
Reference in New Issue
Block a user