Fix single type local delete

Signed-off-by: HichamELBSI <elabbassih@gmail.com>
This commit is contained in:
HichamELBSI 2021-11-25 17:11:18 +01:00
parent 32286aa049
commit 51ae148e90

View File

@ -163,7 +163,7 @@ const SingleTypeFormWrapper = ({ allLayoutData, children, slug }) => {
try {
trackUsageRef.current('willDeleteEntry', trackerProperty);
const { data } = await axiosInstance.delete(getRequestUrl(`${slug}`));
const { data } = await axiosInstance.delete(getRequestUrl(`${slug}${searchToSend}`));
toggleNotification({
type: 'success',
@ -179,7 +179,7 @@ const SingleTypeFormWrapper = ({ allLayoutData, children, slug }) => {
return Promise.reject(err);
}
},
[slug, toggleNotification]
[slug, toggleNotification, searchToSend]
);
const onDeleteSucceeded = useCallback(() => {