mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 12:53:42 +08:00
GET is a more RESTy verb for '/users/:username/emails'
This commit is contained in:
parent
6dac9075dc
commit
c4b52b1a19
|
@ -394,7 +394,6 @@ const User = RestModel.extend({
|
|||
|
||||
checkEmail() {
|
||||
return ajax(`/users/${this.get("username_lower")}/emails.json`, {
|
||||
type: "PUT",
|
||||
data: { context: window.location.pathname }
|
||||
}).then(result => {
|
||||
if (result) {
|
||||
|
|
|
@ -301,7 +301,7 @@ Discourse::Application.routes.draw do
|
|||
get "users/:username.json" => "users#show", constraints: {username: USERNAME_ROUTE_FORMAT}, defaults: {format: :json}
|
||||
get "users/:username" => "users#show", as: 'user', constraints: {username: USERNAME_ROUTE_FORMAT}
|
||||
put "users/:username" => "users#update", constraints: {username: USERNAME_ROUTE_FORMAT}
|
||||
put "users/:username/emails" => "users#check_emails", constraints: {username: USERNAME_ROUTE_FORMAT}
|
||||
get "users/:username/emails" => "users#check_emails", constraints: {username: USERNAME_ROUTE_FORMAT}
|
||||
get "users/:username/preferences" => "users#preferences", constraints: {username: USERNAME_ROUTE_FORMAT}, as: :email_preferences
|
||||
get "users/:username/preferences/email" => "users_email#index", constraints: {username: USERNAME_ROUTE_FORMAT}
|
||||
put "users/:username/preferences/email" => "users_email#update", constraints: {username: USERNAME_ROUTE_FORMAT}
|
||||
|
|
Loading…
Reference in New Issue
Block a user