Skip to content

Commit

Permalink
feat: working clone button
Browse files Browse the repository at this point in the history
  • Loading branch information
danestves committed Dec 22, 2020
1 parent e066cac commit 6149cf5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/admin/main/preview-context/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const PreviewProvider = ({
// Show the loading state
setButtonLoading(true);
const clonedPayload = await request(getRequestUrl(slug), {
method: "POST",
method: "GET",
body: {
...initialData,
cloneOf: initialData.id,
Expand Down Expand Up @@ -296,9 +296,9 @@ function prepareToPublish(payload) {
}

const getRequestUrl = (path) =>
`/${CONTENT_MANAGER_PLUGIN_ID}/explorer/${path}`;
`/${CONTENT_MANAGER_PLUGIN_ID}/collection-types/${path}/${id}`;
const getFrontendEntityUrl = (path, id) =>
`/admin/plugins/${CONTENT_MANAGER_PLUGIN_ID}/collectionType/${path}/${id}`;
`/admin/plugins/${CONTENT_MANAGER_PLUGIN_ID}/collectionType/${path}/create/clone/${id}`;

const getPreviewPluginTrad = (id) => `preview-content.${id}`;

Expand Down

0 comments on commit 6149cf5

Please sign in to comment.