From 0235f5d03709effb0f1a136c69f2f2c20dd224b8 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 19 Oct 2018 14:39:26 -0400 Subject: [PATCH] List Reusable Blocks: Provide context to post request --- packages/list-reusable-blocks/src/utils/export.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/list-reusable-blocks/src/utils/export.js b/packages/list-reusable-blocks/src/utils/export.js index 379ed268b0419..a0d75bd427c1e 100644 --- a/packages/list-reusable-blocks/src/utils/export.js +++ b/packages/list-reusable-blocks/src/utils/export.js @@ -19,8 +19,8 @@ import { download } from './file'; * @param {number} id */ async function exportReusableBlock( id ) { - const postType = await apiFetch( { path: `/wp/v2/types/wp_block?context=edit` } ); - const post = await apiFetch( { path: `/wp/v2/${ postType.rest_base }/${ id }` } ); + const postType = await apiFetch( { path: `/wp/v2/types/wp_block` } ); + const post = await apiFetch( { path: `/wp/v2/${ postType.rest_base }/${ id }?context=edit` } ); const title = post.title.raw; const content = post.content.raw; const fileContent = JSON.stringify( {