fix(review-workflows): add data layer in update request

This commit is contained in:
nathan-pichon 2023-02-13 11:06:19 +01:00
parent a12660e3fb
commit fae3368c53
No known key found for this signature in database
2 changed files with 4 additions and 2 deletions

View File

@ -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);

View File

@ -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=*`