Sha256: a63f34a56606c183d3ee596576ceb8ed7c5555ef1be042d23af93fa186134c50

Contents?: true

Size: 706 Bytes

Versions: 18

Compression:

Stored size: 706 Bytes

Contents

# frozen_string_literal: true
require 'dato/site/repo/base'

module Dato
  module Site
    module Repo
      class Site < Base
        def find
          get_request '/site'
        end

        def update(resource_attributes)
          body = JsonApiSerializer.new(
            type: :site,
            attributes: %i(favicon global_seo locales name no_index production_deploy_adapter production_deploy_settings production_frontend_url production_spider_enabled require_2fa ssg staging_deploy_adapter staging_deploy_settings staging_frontend_url staging_spider_enabled theme timezone)
          ).serialize(resource_attributes)

          put_request '/site', body
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
dato-0.5.1 lib/dato/site/repo/site.rb
dato-0.5.0 lib/dato/site/repo/site.rb
dato-0.4.3 lib/dato/site/repo/site.rb
dato-0.4.2 lib/dato/site/repo/site.rb
dato-0.4.1 lib/dato/site/repo/site.rb
dato-0.4.0 lib/dato/site/repo/site.rb
dato-0.3.31 lib/dato/site/repo/site.rb
dato-0.4.0.pre lib/dato/site/repo/site.rb
dato-0.3.30 lib/dato/site/repo/site.rb
dato-0.3.29 lib/dato/site/repo/site.rb
dato-0.3.28 lib/dato/site/repo/site.rb
dato-0.3.27 lib/dato/site/repo/site.rb
dato-0.3.26 lib/dato/site/repo/site.rb
dato-0.3.25 lib/dato/site/repo/site.rb
dato-0.3.24 lib/dato/site/repo/site.rb
dato-0.3.23 lib/dato/site/repo/site.rb
dato-0.3.22 lib/dato/site/repo/site.rb
dato-0.3.21 lib/dato/site/repo/site.rb