diff options
Diffstat (limited to 'lib/api/pages_domains.rb')
-rw-r--r-- | lib/api/pages_domains.rb | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/api/pages_domains.rb b/lib/api/pages_domains.rb index 78442f465bd..05e1363ab16 100644 --- a/lib/api/pages_domains.rb +++ b/lib/api/pages_domains.rb @@ -17,7 +17,7 @@ module API helpers do # rubocop: disable CodeReuse/ActiveRecord def find_pages_domain! - user_project.pages_domains.find_by(domain: params[:domain]) || not_found!('PagesDomain') + user_project.pages_domains.find_by(domain: params[:domain]) || not_found!("PagesDomain") end # rubocop: enable CodeReuse/ActiveRecord @@ -28,7 +28,7 @@ module API def normalize_params_file_to_string params.each do |k, v| if v.is_a?(Hash) && v.key?(:tempfile) - params[k] = v[:tempfile].to_a.join('') + params[k] = v[:tempfile].to_a.join("") end end end @@ -52,14 +52,14 @@ module API end params do - requires :id, type: String, desc: 'The ID of a project' + requires :id, type: String, desc: "The ID of a project" end resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do before do require_pages_enabled! end - desc 'Get all pages domains' do + desc "Get all pages domains" do success Entities::PagesDomain end params do @@ -73,11 +73,11 @@ module API end # rubocop: enable CodeReuse/ActiveRecord - desc 'Get a single pages domain' do + desc "Get a single pages domain" do success Entities::PagesDomain end params do - requires :domain, type: String, desc: 'The domain' + requires :domain, type: String, desc: "The domain" end get ":id/pages/domains/:domain", requirements: PAGES_DOMAINS_ENDPOINT_REQUIREMENTS do authorize! :read_pages, user_project @@ -85,13 +85,13 @@ module API present pages_domain, with: Entities::PagesDomain end - desc 'Create a new pages domain' do + desc "Create a new pages domain" do success Entities::PagesDomain end params do - requires :domain, type: String, desc: 'The domain' - optional :certificate, allow_blank: false, types: [File, String], desc: 'The certificate' - optional :key, allow_blank: false, types: [File, String], desc: 'The key' + requires :domain, type: String, desc: "The domain" + optional :certificate, allow_blank: false, types: [File, String], desc: "The certificate" + optional :key, allow_blank: false, types: [File, String], desc: "The key" all_or_none_of :certificate, :key end post ":id/pages/domains" do @@ -107,11 +107,11 @@ module API end end - desc 'Updates a pages domain' + desc "Updates a pages domain" params do - requires :domain, type: String, desc: 'The domain' - optional :certificate, allow_blank: false, types: [File, String], desc: 'The certificate' - optional :key, allow_blank: false, types: [File, String], desc: 'The key' + requires :domain, type: String, desc: "The domain" + optional :certificate, allow_blank: false, types: [File, String], desc: "The certificate" + optional :key, allow_blank: false, types: [File, String], desc: "The key" end put ":id/pages/domains/:domain", requirements: PAGES_DOMAINS_ENDPOINT_REQUIREMENTS do authorize! :update_pages, user_project @@ -130,9 +130,9 @@ module API end end - desc 'Delete a pages domain' + desc "Delete a pages domain" params do - requires :domain, type: String, desc: 'The domain' + requires :domain, type: String, desc: "The domain" end delete ":id/pages/domains/:domain", requirements: PAGES_DOMAINS_ENDPOINT_REQUIREMENTS do authorize! :update_pages, user_project |