diff --git a/app/serializers/alchemy/json_api/page_serializer.rb b/app/serializers/alchemy/json_api/page_serializer.rb index 8d6f962..7015f54 100644 --- a/app/serializers/alchemy/json_api/page_serializer.rb +++ b/app/serializers/alchemy/json_api/page_serializer.rb @@ -15,7 +15,8 @@ class PageSerializer < BaseSerializer :meta_keywords, :meta_description, :created_at, - :updated_at + :updated_at, + :restricted ) cache_options store: Rails.cache, namespace: "alchemy-jsonapi" diff --git a/spec/serializers/alchemy/json_api/page_serializer_spec.rb b/spec/serializers/alchemy/json_api/page_serializer_spec.rb index cbc3d45..bf6eef6 100644 --- a/spec/serializers/alchemy/json_api/page_serializer_spec.rb +++ b/spec/serializers/alchemy/json_api/page_serializer_spec.rb @@ -36,6 +36,7 @@ expect(attributes[:created_at]).to eq(page.created_at) expect(attributes[:updated_at]).to eq(page.updated_at) expect(attributes[:legacy_urls]).to eq(["/other"]) + expect(attributes[:restricted]).to be false expect(attributes.keys).not_to include(:tag_list, :status) end end