fix(content-releases): validation and cache releases

This commit is contained in:
Fernando Chavez 2024-09-12 20:52:06 +02:00
parent d9962a84d0
commit 8f7f41b32f
2 changed files with 5 additions and 2 deletions

View File

@ -114,7 +114,7 @@ const createYupSchema = (
// an array of objects with {id} properties, representing the related entities.
return yup.array().of(
yup.object().shape({
id: yup.string().required(),
id: yup.number().required(),
})
);
} else if (typeof value === 'object') {

View File

@ -187,7 +187,10 @@ const releaseApi = adminApi
method: 'GET',
};
},
providesTags: (result, error, arg) => [{ type: 'Release' as const, id: arg.id }],
providesTags: (result, error, arg) => [
{ type: 'Release', id: 'LIST' },
{ type: 'Release' as const, id: arg.id },
],
}),
getReleaseActions: build.query<
GetReleaseActions.Response,