fix: error not valid json payload
This commit is contained in:
parent
f1d4584d02
commit
eca99dbcd1
1 changed files with 4 additions and 3 deletions
|
|
@ -540,7 +540,7 @@ export class CreditNoteActionController extends Controller {
|
||||||
async updateStatus(
|
async updateStatus(
|
||||||
@Request() req: RequestWithUser,
|
@Request() req: RequestWithUser,
|
||||||
@Path() creditNoteId: string,
|
@Path() creditNoteId: string,
|
||||||
@Body() body: PaybackStatus,
|
@Body() body: { paybackStatus: PaybackStatus },
|
||||||
) {
|
) {
|
||||||
await this.#checkPermission(req.user, creditNoteId);
|
await this.#checkPermission(req.user, creditNoteId);
|
||||||
return await prisma.creditNote.update({
|
return await prisma.creditNote.update({
|
||||||
|
|
@ -554,8 +554,9 @@ export class CreditNoteActionController extends Controller {
|
||||||
quotation: true,
|
quotation: true,
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
creditNoteStatus: body === PaybackStatus.Done ? CreditNoteStatus.Success : undefined,
|
creditNoteStatus:
|
||||||
paybackStatus: body,
|
body.paybackStatus === PaybackStatus.Done ? CreditNoteStatus.Success : undefined,
|
||||||
|
paybackStatus: body.paybackStatus,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue