From 5d01f49ce9019c899aab5b354011453743e9ac5c Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Tue, 24 Mar 2020 10:33:45 -0400 Subject: [PATCH] Move /me/oauth/remove endpoint to /api/me/oauth/remove --- routes.go | 2 +- templates/user/settings.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/routes.go b/routes.go index 764e36f..b34bd3d 100644 --- a/routes.go +++ b/routes.go @@ -105,7 +105,6 @@ func InitRoutes(apper Apper, r *mux.Router) *mux.Router { me.HandleFunc("/settings", handler.User(viewSettings)).Methods("GET") me.HandleFunc("/invites", handler.User(handleViewUserInvites)).Methods("GET") me.HandleFunc("/logout", handler.Web(viewLogout, UserLevelNone)).Methods("GET") - me.HandleFunc("/oauth/remove", handler.User(removeOauth)).Methods("POST") write.HandleFunc("/api/me", handler.All(viewMeAPI)).Methods("GET") apiMe := write.PathPrefix("/api/me/").Subrouter() @@ -116,6 +115,7 @@ func InitRoutes(apper Apper, r *mux.Router) *mux.Router { apiMe.HandleFunc("/self", handler.All(updateSettings)).Methods("POST") apiMe.HandleFunc("/invites", handler.User(handleCreateUserInvite)).Methods("POST") apiMe.HandleFunc("/import", handler.User(handleImport)).Methods("POST") + apiMe.HandleFunc("/oauth/remove", handler.User(removeOauth)).Methods("POST") // Sign up validation write.HandleFunc("/api/alias", handler.All(handleUsernameCheck)).Methods("POST") diff --git a/templates/user/settings.tmpl b/templates/user/settings.tmpl index e4209d7..a403feb 100644 --- a/templates/user/settings.tmpl +++ b/templates/user/settings.tmpl @@ -72,7 +72,7 @@ h3 { font-weight: normal; } {{ if .OauthAccounts }}

Existing OAuth accounts can be removed from your account.

{{ range $oauth_account := .OauthAccounts }} -
+