Skip to content

Commit 798eed5

Browse files
committed
Unpublishes /info page prefix route
After running the migration all /info pages will return a 410. Originally created the rake task in info-frontend [1] (where the route is published), however the publishing-api bearer token no longer exists so moving the tmp migration to publishing-api. Didn't particularly trust the content-id specified in info-frontend [2] so pulling the id from the edition in publishing-api. A manual check shows they're both the same. Trello: https://trello.com/c/zODyxEf3/2372-unpublish-info-prefix-route-and-mark-as-gone [1]: alphagov/info-frontend#1363 [2]: https://github.com/alphagov/info-frontend/blob/07e5bd441549d3ea7697584cf6d474f0f1de0674/lib/tasks/publishing_api.rake#L19
1 parent 7827dcd commit 798eed5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
desc "Unpublishes /info page as part of the info-frontend retirement"
2+
task tmp_unpublish_info_pages: :environment do
3+
info_page = Edition.live.find_by_base_path("/info")
4+
5+
payload = {
6+
content_id: info_page.content_id,
7+
type: "gone",
8+
discard_drafts: true,
9+
}
10+
11+
Commands::V2::Unpublish.call(payload)
12+
end

0 commit comments

Comments
 (0)