Sha256: 38a8be5954d642f693bcd5191afb73e5c8f432b17eba4caa51a3f1ec386fb783

Contents?: true

Size: 535 Bytes

Versions: 14

Compression:

Stored size: 535 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(deploy_adapter deploy_settings favicon global_seo locales name no_index ssg theme_hue timezone)
          ).serialize(resource_attributes)

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

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
dato-0.3.9.1 lib/dato/site/repo/site.rb
dato-0.3.11 lib/dato/site/repo/site.rb
dato-0.3.10 lib/dato/site/repo/site.rb
dato-0.3.9 lib/dato/site/repo/site.rb
dato-0.3.8 lib/dato/site/repo/site.rb
dato-0.3.7 lib/dato/site/repo/site.rb
dato-0.3.6 lib/dato/site/repo/site.rb
dato-0.3.5 lib/dato/site/repo/site.rb
dato-0.3.3 lib/dato/site/repo/site.rb
dato-0.3.2 lib/dato/site/repo/site.rb
dato-0.3.1 lib/dato/site/repo/site.rb
dato-0.3.0 lib/dato/site/repo/site.rb
dato-0.2.7 lib/dato/site/repo/site.rb
dato-0.2.6 lib/dato/site/repo/site.rb