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(
|
||||
@Request() req: RequestWithUser,
|
||||
@Path() creditNoteId: string,
|
||||
@Body() body: PaybackStatus,
|
||||
@Body() body: { paybackStatus: PaybackStatus },
|
||||
) {
|
||||
await this.#checkPermission(req.user, creditNoteId);
|
||||
return await prisma.creditNote.update({
|
||||
|
|
@ -554,8 +554,9 @@ export class CreditNoteActionController extends Controller {
|
|||
quotation: true,
|
||||
},
|
||||
data: {
|
||||
creditNoteStatus: body === PaybackStatus.Done ? CreditNoteStatus.Success : undefined,
|
||||
paybackStatus: body,
|
||||
creditNoteStatus:
|
||||
body.paybackStatus === PaybackStatus.Done ? CreditNoteStatus.Success : undefined,
|
||||
paybackStatus: body.paybackStatus,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue