Allow empty content for checkin
This commit is contained in:
@@ -18,8 +18,6 @@ module Adamantium
|
|||||||
post_params = prepare_params(params: post)
|
post_params = prepare_params(params: post)
|
||||||
created_post = post_repo.create(post_params)
|
created_post = post_repo.create(post_params)
|
||||||
|
|
||||||
logger.info("CREATED: #{created_post.inspect}")
|
|
||||||
|
|
||||||
syndication_sources.each do |url|
|
syndication_sources.each do |url|
|
||||||
add_post_syndication_source.call(created_post.id, :swarm, url)
|
add_post_syndication_source.call(created_post.id, :swarm, url)
|
||||||
end
|
end
|
||||||
|
@@ -4,7 +4,7 @@ module Adamantium
|
|||||||
class CheckinContract < Dry::Validation::Contract
|
class CheckinContract < Dry::Validation::Contract
|
||||||
params do
|
params do
|
||||||
required(:name).maybe(:string)
|
required(:name).maybe(:string)
|
||||||
required(:content).filled(:string)
|
required(:content).maybe(:string)
|
||||||
required(:category).array(:string)
|
required(:category).array(:string)
|
||||||
required(:published_at).maybe(:time)
|
required(:published_at).maybe(:time)
|
||||||
required(:slug).filled(:string)
|
required(:slug).filled(:string)
|
||||||
|
Reference in New Issue
Block a user