Skip to content

Commit 8c1bf73

Browse files
committed
Publish the content_item after putting
> v2 put_content sends the item as draft only. You need to also call `publish(content_id, update_type)` to actually mark the content as live and sent it to the live content-store.
1 parent 922ec30 commit 8c1bf73

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

app/presenters/flow_content_item.rb

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ def payload
1313
format: 'placeholder_smart_answer',
1414
publishing_app: 'smartanswers',
1515
rendering_app: 'smartanswers',
16-
update_type: 'minor',
1716
locale: 'en',
1817
public_updated_at: Time.now.iso8601,
1918
routes: [

app/services/content_item_publisher.rb

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ def publish(flow_presenters)
33
flow_presenters.each do |smart_answer|
44
content_item = FlowContentItem.new(smart_answer)
55
Services.publishing_api.put_content(content_item.content_id, content_item.payload)
6+
Services.publishing_api.publish(content_item.content_id, 'minor')
67
end
78
end
89
end

0 commit comments

Comments
 (0)