add middleware writeLog
This commit is contained in:
parent
9350f061c5
commit
ccfd6cc0ad
|
|
@ -5,4 +5,5 @@ coverage
|
|||
.DS_STORE
|
||||
.env
|
||||
app/utils/indexSN.txt
|
||||
app/store
|
||||
tmp
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ export default class ErpsController {
|
|||
?.split(":")[1]
|
||||
?.replace("\r", "")
|
||||
.trim() !== "" &&
|
||||
SN !== "N/A" && SN !== "NA" && SN.length>4
|
||||
SN !== "N/A" && SN.length>4
|
||||
) {
|
||||
if (output.some((u) => u.SN === SN)) {
|
||||
output.map((u, index) => {
|
||||
|
|
@ -283,7 +283,7 @@ export default class ErpsController {
|
|||
);
|
||||
// console.log(report);
|
||||
return report.filter(
|
||||
(i) => i.SN !== "" && /^[A-Z0-9-]{5,}$/.test(i.SN) === true && i.PID !=="" && SN!=="NA"
|
||||
(i) => i.SN !== "" && /^[A-Z0-9-]{5,}$/.test(i.SN) === true && i.PID !==""
|
||||
);
|
||||
// }, 15000);
|
||||
} catch (error) {
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ runtimeCheckLogs(Env.get("FOLDER_LOGS"));
|
|||
|
||||
Route.post("/api/getIndexSerialNumber", "ErpsController.getIndexSerialNumber")
|
||||
.middleware("checkToken")
|
||||
.middleware("writeLog");
|
||||
// .middleware("writeLog");
|
||||
|
||||
Route.post("/api/getParagraph", "ErpsController.getParagraph")
|
||||
.middleware("checkToken")
|
||||
|
|
|
|||
Loading…
Reference in New Issue