mirror of
https://github.com/strapi/strapi.git
synced 2025-11-13 16:52:18 +00:00
Merge pull request #9893 from strapi/i18n/add-qs-to-cm-actions
Add search params to publish action
This commit is contained in:
commit
51d98debe1
@ -211,7 +211,7 @@ const SingleTypeFormWrapper = ({ allLayoutData, children, slug }) => {
|
|||||||
const onPublish = useCallback(async () => {
|
const onPublish = useCallback(async () => {
|
||||||
try {
|
try {
|
||||||
emitEventRef.current('willPublishEntry');
|
emitEventRef.current('willPublishEntry');
|
||||||
const endPoint = getRequestUrl(`${slug}/actions/publish`);
|
const endPoint = getRequestUrl(`${slug}/actions/publish${searchToSend}`);
|
||||||
|
|
||||||
dispatch(setStatus('publish-pending'));
|
dispatch(setStatus('publish-pending'));
|
||||||
|
|
||||||
@ -231,7 +231,7 @@ const SingleTypeFormWrapper = ({ allLayoutData, children, slug }) => {
|
|||||||
|
|
||||||
dispatch(setStatus('resolved'));
|
dispatch(setStatus('resolved'));
|
||||||
}
|
}
|
||||||
}, [cleanReceivedData, displayErrors, slug, dispatch]);
|
}, [cleanReceivedData, displayErrors, slug, searchToSend, dispatch]);
|
||||||
|
|
||||||
const onPut = useCallback(
|
const onPut = useCallback(
|
||||||
async (body, trackerProperty) => {
|
async (body, trackerProperty) => {
|
||||||
@ -267,7 +267,7 @@ const SingleTypeFormWrapper = ({ allLayoutData, children, slug }) => {
|
|||||||
|
|
||||||
// The publish and unpublish method could be refactored but let's leave the duplication for now
|
// The publish and unpublish method could be refactored but let's leave the duplication for now
|
||||||
const onUnpublish = useCallback(async () => {
|
const onUnpublish = useCallback(async () => {
|
||||||
const endPoint = getRequestUrl(`${slug}/actions/unpublish`);
|
const endPoint = getRequestUrl(`${slug}/actions/unpublish${searchToSend}`);
|
||||||
|
|
||||||
dispatch(setStatus('unpublish-pending'));
|
dispatch(setStatus('unpublish-pending'));
|
||||||
|
|
||||||
@ -286,7 +286,7 @@ const SingleTypeFormWrapper = ({ allLayoutData, children, slug }) => {
|
|||||||
dispatch(setStatus('resolved'));
|
dispatch(setStatus('resolved'));
|
||||||
displayErrors(err);
|
displayErrors(err);
|
||||||
}
|
}
|
||||||
}, [cleanReceivedData, displayErrors, slug, dispatch]);
|
}, [cleanReceivedData, displayErrors, slug, dispatch, searchToSend]);
|
||||||
|
|
||||||
return children({
|
return children({
|
||||||
componentsDataStructure,
|
componentsDataStructure,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user