Only allow primary domain for RS

Replace user addresses with usernames in the respective URLs
This commit is contained in:
Râu Cao
2023-11-01 21:46:38 +01:00
parent 5075fef616
commit 56c127ca0c
7 changed files with 65 additions and 43 deletions

View File

@@ -78,8 +78,8 @@ Rails.application.routes.draw do
namespace :rs do
resource :oauth, only: [:new, :create], path_names: {
new: ':useraddress', create: ':useraddress'
}, controller: 'oauth', constraints: { useraddress: /[^\/]+/}
new: ':username', create: ':username'
}, controller: 'oauth'
get 'oauth/token/:id/launch_app' => 'oauth#launch_app', as: :launch_app
end