Fix contracts

This commit is contained in:
2023-01-29 12:41:10 +11:00
parent 6fd1aff858
commit 377195c8d3
3 changed files with 3 additions and 1 deletions

View File

@@ -5,7 +5,7 @@ module Adamantium
include Deps["settings", "syndication.mastodon"]
def call(post)
if post.syndicate_to.include settings.mastodon_server
if post[:syndicate_to].include settings.mastodon_server
mastodon.call(post: post)
end
end

View File

@@ -10,6 +10,7 @@ module Adamantium
required(:url).filled(:string)
required(:slug).filled(:string)
required(:post_type).value(included_in?: %w[bookmark])
required(:syndicate_to).array(:string)
end
end
end

View File

@@ -9,6 +9,7 @@ module Adamantium
required(:published_at).maybe(:time)
required(:slug).filled(:string)
required(:post_type).value(included_in?: %w[post])
required(:syndicate_to).array(:string)
end
end
end