Skip to content

Commit

Permalink
Add restricted value to page serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Manley authored and Andrew Manley committed Jun 7, 2024
1 parent f38b202 commit fdc48df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/serializers/alchemy/json_api/page_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions spec/serializers/alchemy/json_api/page_serializer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fdc48df

Please sign in to comment.