update api
This commit is contained in:
parent
1c0ac91ae8
commit
88d15e3c3e
|
@ -65,7 +65,7 @@ func (handler APIHandler) CreateDictItemAction(w http.ResponseWriter, req *http.
|
|||
return
|
||||
}
|
||||
|
||||
err = orm.Save(dict)
|
||||
err = orm.Create(&dict)
|
||||
if err != nil {
|
||||
resp["status"] = false
|
||||
resp["error"] = err
|
||||
|
|
|
@ -78,13 +78,11 @@ func Init(cfg *config.AppConfig) {
|
|||
|
||||
|
||||
|
||||
api.HandleAPIMethod(api.POST, "/api/login/account", handler.AccountLogin)
|
||||
api.HandleAPIMethod(api.GET, "/api/currentUser", handler.CurrentUser)
|
||||
|
||||
|
||||
api.HandleAPIMethod(api.POST, "/account/login", handler.AccountLogin)
|
||||
api.HandleAPIMethod(api.GET, "/account/current_user", handler.CurrentUser)
|
||||
|
||||
api.HandleAPIMethod(api.GET, "/account/current_user", handler.CurrentUser)
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue