feat: allow user to specify true or false cancel
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 5s
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 5s
This commit is contained in:
parent
cfe820b89f
commit
e76abd787c
1 changed files with 6 additions and 6 deletions
|
|
@ -784,7 +784,7 @@ export class LineController extends Controller {
|
|||
async customerRequestCancel(
|
||||
@Path() requestDataId: string,
|
||||
@Request() req: RequestWithLineUser,
|
||||
@Body() body: { reason: string },
|
||||
@Body() body: { cancel: boolean; reason?: string },
|
||||
) {
|
||||
const result = await prisma.requestData.updateMany({
|
||||
where: {
|
||||
|
|
@ -803,8 +803,8 @@ export class LineController extends Controller {
|
|||
},
|
||||
},
|
||||
data: {
|
||||
customerRequestCancel: true,
|
||||
customerRequestCancelReason: body.reason,
|
||||
customerRequestCancel: body.cancel,
|
||||
customerRequestCancelReason: body.reason || "",
|
||||
},
|
||||
});
|
||||
if (result.count <= 0) throw notFoundError("Request Data");
|
||||
|
|
@ -815,7 +815,7 @@ export class LineController extends Controller {
|
|||
async customerRequestCancelWork(
|
||||
@Path() requestWorkId: string,
|
||||
@Request() req: RequestWithLineUser,
|
||||
@Body() body: { reason: string },
|
||||
@Body() body: { cancel: boolean; reason?: string },
|
||||
) {
|
||||
const result = await prisma.requestWork.updateMany({
|
||||
where: {
|
||||
|
|
@ -836,8 +836,8 @@ export class LineController extends Controller {
|
|||
},
|
||||
},
|
||||
data: {
|
||||
customerRequestCancel: true,
|
||||
customerRequestCancelReason: body.reason,
|
||||
customerRequestCancel: body.cancel,
|
||||
customerRequestCancelReason: body.reason || "",
|
||||
},
|
||||
});
|
||||
if (result.count <= 0) throw notFoundError("Request Data");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue