fix: prevent line user id and otp exposes
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 4s
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 4s
This commit is contained in:
parent
b89c68425c
commit
ea8cd7cb72
3 changed files with 57 additions and 1 deletions
|
|
@ -207,6 +207,11 @@ export class CustomerController extends Controller {
|
|||
district: true,
|
||||
subDistrict: true,
|
||||
},
|
||||
omit: {
|
||||
otpCode: true,
|
||||
otpExpires: true,
|
||||
userId: true,
|
||||
},
|
||||
orderBy: [{ statusOrder: "asc" }, { createdAt: "asc" }],
|
||||
}
|
||||
: {
|
||||
|
|
@ -215,6 +220,11 @@ export class CustomerController extends Controller {
|
|||
district: true,
|
||||
subDistrict: true,
|
||||
},
|
||||
omit: {
|
||||
otpCode: true,
|
||||
otpExpires: true,
|
||||
userId: true,
|
||||
},
|
||||
take: 1,
|
||||
orderBy: { createdAt: "asc" },
|
||||
},
|
||||
|
|
@ -245,6 +255,11 @@ export class CustomerController extends Controller {
|
|||
district: true,
|
||||
subDistrict: true,
|
||||
},
|
||||
omit: {
|
||||
otpCode: true,
|
||||
otpExpires: true,
|
||||
userId: true,
|
||||
},
|
||||
orderBy: { createdAt: "asc" },
|
||||
},
|
||||
createdBy: true,
|
||||
|
|
@ -316,6 +331,11 @@ export class CustomerController extends Controller {
|
|||
district: true,
|
||||
subDistrict: true,
|
||||
},
|
||||
omit: {
|
||||
otpCode: true,
|
||||
otpExpires: true,
|
||||
userId: true,
|
||||
},
|
||||
},
|
||||
createdBy: true,
|
||||
updatedBy: true,
|
||||
|
|
@ -415,6 +435,11 @@ export class CustomerController extends Controller {
|
|||
district: true,
|
||||
subDistrict: true,
|
||||
},
|
||||
omit: {
|
||||
otpCode: true,
|
||||
otpExpires: true,
|
||||
userId: true,
|
||||
},
|
||||
},
|
||||
createdBy: true,
|
||||
updatedBy: true,
|
||||
|
|
@ -453,7 +478,13 @@ export class CustomerController extends Controller {
|
|||
await deleteFolder(`customer/${customerId}`);
|
||||
const data = await tx.customer.delete({
|
||||
include: {
|
||||
branch: true,
|
||||
branch: {
|
||||
omit: {
|
||||
otpCode: true,
|
||||
otpExpires: true,
|
||||
userId: true,
|
||||
},
|
||||
},
|
||||
registeredBranch: {
|
||||
include: {
|
||||
headOffice: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue