Skip to content

Commit 298cdaf

Browse files
committed
Move org_domain controller out of api namespace
1 parent c5dbd14 commit 298cdaf

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

app/controllers/api/org_domain_controller.rb renamed to app/controllers/org_domain_controller.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# frozen_string_literal: true
22

3-
module Api
43
# Controller for API routes that return orgs by domain.
54
class OrgDomainController < ApplicationController
65

@@ -85,4 +84,4 @@ def search_params
8584
params.permit(:email, :format, :org_domain)
8685
end
8786
end
88-
end
87+

app/javascript/src/shared/createAccountForm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ $(() => {
6464
};
6565

6666
// Use Fetch API with POST configuration included in requestOptions
67-
fetch('/api/orgs-by-domain', requestOptions)
67+
fetch('/orgs-by-domain', requestOptions)
6868
.then(response => response.json())
6969
.then(data => {
7070
populateOrgSelect(data);

config/routes.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,11 @@
204204
resources :templates, only: [:index]
205205
end
206206

207-
post 'orgs-by-domain', to: 'org_domain#index'
208207
end
209208

209+
post 'orgs-by-domain', to: 'org_domain#index'
210+
211+
210212
namespace :paginable do
211213
resources :orgs, only: [] do
212214
get 'index/:page', action: :index, on: :collection, as: :index

0 commit comments

Comments
 (0)