mirror of
https://github.com/strapi/strapi.git
synced 2025-09-27 09:25:46 +00:00
fix(content-releases): validation and cache releases
This commit is contained in:
parent
d9962a84d0
commit
8f7f41b32f
@ -114,7 +114,7 @@ const createYupSchema = (
|
|||||||
// an array of objects with {id} properties, representing the related entities.
|
// an array of objects with {id} properties, representing the related entities.
|
||||||
return yup.array().of(
|
return yup.array().of(
|
||||||
yup.object().shape({
|
yup.object().shape({
|
||||||
id: yup.string().required(),
|
id: yup.number().required(),
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
} else if (typeof value === 'object') {
|
} else if (typeof value === 'object') {
|
||||||
|
@ -187,7 +187,10 @@ const releaseApi = adminApi
|
|||||||
method: 'GET',
|
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: build.query<
|
||||||
GetReleaseActions.Response,
|
GetReleaseActions.Response,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user