mirror of
https://github.com/strapi/strapi.git
synced 2025-12-10 14:34:22 +00:00
fix(review-workflows): add data layer in update request
This commit is contained in:
parent
a12660e3fb
commit
fae3368c53
@ -44,7 +44,9 @@ module.exports = {
|
||||
async replace(ctx) {
|
||||
const { workflow_id: workflowId } = ctx.params;
|
||||
const stagesService = getService('stages');
|
||||
const { body: stages } = ctx.request;
|
||||
const {
|
||||
body: { data: stages },
|
||||
} = ctx.request;
|
||||
|
||||
const stagesValidated = await validateUpdateStages(stages);
|
||||
|
||||
|
||||
@ -216,7 +216,7 @@ describeOnCondition(edition === 'EE')('Review workflows', () => {
|
||||
test('It should be available for every connected users (admin)', async () => {
|
||||
const stagesRes = await requests.admin.put(
|
||||
`/admin/review-workflows/workflows/${testWorkflow.id}/stages`,
|
||||
{ body: stagesUpdateData }
|
||||
{ body: { data: stagesUpdateData } }
|
||||
);
|
||||
const workflowRes = await requests.admin.get(
|
||||
`/admin/review-workflows/workflows/${testWorkflow.id}?populate=*`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user