update cronjob snapshot
This commit is contained in:
parent
1274ab5001
commit
a4e3e5d417
2 changed files with 1402 additions and 350 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -55,7 +55,7 @@ class CallAPI {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Post
|
//Post
|
||||||
public async PostData(request: any, @Path() path: any, sendData: any) {
|
public async PostData(request: any, @Path() path: any, sendData: any, log = true) {
|
||||||
const token = "Bearer " + request.headers.authorization.replace("Bearer ", "");
|
const token = "Bearer " + request.headers.authorization.replace("Bearer ", "");
|
||||||
const url = process.env.API_URL + path;
|
const url = process.env.API_URL + path;
|
||||||
try {
|
try {
|
||||||
|
|
@ -67,6 +67,7 @@ class CallAPI {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.log("processing data...");
|
console.log("processing data...");
|
||||||
|
if (log)
|
||||||
addLogSequence(request, {
|
addLogSequence(request, {
|
||||||
action: "request",
|
action: "request",
|
||||||
status: "success",
|
status: "success",
|
||||||
|
|
@ -80,6 +81,7 @@ class CallAPI {
|
||||||
});
|
});
|
||||||
return response.data.result;
|
return response.data.result;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if (log)
|
||||||
addLogSequence(request, {
|
addLogSequence(request, {
|
||||||
action: "request",
|
action: "request",
|
||||||
status: "error",
|
status: "error",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue