Fix contracts
This commit is contained in:
@@ -5,7 +5,7 @@ module Adamantium
|
|||||||
include Deps["settings", "syndication.mastodon"]
|
include Deps["settings", "syndication.mastodon"]
|
||||||
|
|
||||||
def call(post)
|
def call(post)
|
||||||
if post.syndicate_to.include settings.mastodon_server
|
if post[:syndicate_to].include settings.mastodon_server
|
||||||
mastodon.call(post: post)
|
mastodon.call(post: post)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@@ -10,6 +10,7 @@ module Adamantium
|
|||||||
required(:url).filled(:string)
|
required(:url).filled(:string)
|
||||||
required(:slug).filled(:string)
|
required(:slug).filled(:string)
|
||||||
required(:post_type).value(included_in?: %w[bookmark])
|
required(:post_type).value(included_in?: %w[bookmark])
|
||||||
|
required(:syndicate_to).array(:string)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@@ -9,6 +9,7 @@ module Adamantium
|
|||||||
required(:published_at).maybe(:time)
|
required(:published_at).maybe(:time)
|
||||||
required(:slug).filled(:string)
|
required(:slug).filled(:string)
|
||||||
required(:post_type).value(included_in?: %w[post])
|
required(:post_type).value(included_in?: %w[post])
|
||||||
|
required(:syndicate_to).array(:string)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user