Fix contracts
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user