Sha256: caa20d104ed9cef138d8cdb7081ddfc105b687466a06f82637cd799cd3579e0b

Contents?: true

Size: 548 Bytes

Versions: 9

Compression:

Stored size: 548 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 frontend_url 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

9 entries across 9 versions & 1 rubygems

Version Path
dato-0.3.20 lib/dato/site/repo/site.rb
dato-0.3.19 lib/dato/site/repo/site.rb
dato-0.3.18 lib/dato/site/repo/site.rb
dato-0.3.17 lib/dato/site/repo/site.rb
dato-0.3.16 lib/dato/site/repo/site.rb
dato-0.3.15 lib/dato/site/repo/site.rb
dato-0.3.14 lib/dato/site/repo/site.rb
dato-0.3.13 lib/dato/site/repo/site.rb
dato-0.3.12 lib/dato/site/repo/site.rb