fix: releases status update

This commit is contained in:
Alexandre Bodin 2024-09-16 20:47:18 +02:00
parent 860b3bae00
commit d272f5d183
2 changed files with 6 additions and 2 deletions

View File

@ -276,7 +276,11 @@ const releaseApi = adminApi
data: body,
};
},
invalidatesTags: () => [{ type: 'ReleaseAction', id: 'LIST' }],
invalidatesTags: (res, error, arg) => [
{ type: 'ReleaseAction', id: 'LIST' },
{ type: 'Release', id: 'LIST' },
{ type: 'Release', id: arg.params.releaseId },
],
async onQueryStarted({ body, params, query, actionPath }, { dispatch, queryFulfilled }) {
// We need to mimic the same params received by the getReleaseActions query
const paramsWithoutActionId = {

View File

@ -291,7 +291,7 @@ const createReleaseActionService = ({ strapi }: { strapi: Core.Strapi }) => {
const actionStatus =
update.type === 'publish'
? getDraftEntryValidStatus(
? await getDraftEntryValidStatus(
{
contentType: action.contentType,
documentId: action.entryDocumentId,