diff --git a/handlers/api.go b/handlers/api.go index b153bb98..c5acf04e 100644 --- a/handlers/api.go +++ b/handlers/api.go @@ -45,22 +45,19 @@ func apiRenewHandler(w http.ResponseWriter, r *http.Request) { } func apiUpdateOAuthHandler(w http.ResponseWriter, r *http.Request) { - var c core.OAuth - if err := DecodeJSON(r, &c); err != nil { + var oauth core.OAuth + if err := DecodeJSON(r, &oauth); err != nil { sendErrorJson(err, w, r) return } - app := core.App - app.OAuth = c - if err := app.Update(); err != nil { + core.App.OAuth = oauth + if err := core.App.Update(); err != nil { sendErrorJson(err, w, r) return } - fmt.Println(app) - - sendJsonAction(app.OAuth, "update", w, r) + sendJsonAction(core.App.OAuth, "update", w, r) } func apiOAuthHandler(r *http.Request) interface{} {