rabbitMQ command
This commit is contained in:
parent
cb4fc6defb
commit
608c8967bc
7 changed files with 440 additions and 37 deletions
|
|
@ -41,7 +41,7 @@ class CallAPI {
|
|||
}
|
||||
}
|
||||
//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 url = process.env.API_URL + path;
|
||||
try {
|
||||
|
|
@ -52,7 +52,7 @@ class CallAPI {
|
|||
api_key: process.env.API_KEY,
|
||||
},
|
||||
});
|
||||
addLogSequence(request, {
|
||||
if (log) addLogSequence(request, {
|
||||
action: "request",
|
||||
status: "success",
|
||||
description: "connected",
|
||||
|
|
@ -65,7 +65,7 @@ class CallAPI {
|
|||
});
|
||||
return response.data.result;
|
||||
} catch (error) {
|
||||
addLogSequence(request, {
|
||||
if (log) addLogSequence(request, {
|
||||
action: "request",
|
||||
status: "error",
|
||||
description: "unconnected",
|
||||
|
|
@ -80,6 +80,7 @@ class CallAPI {
|
|||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
//Post
|
||||
public async PostDataKeycloak(@Path() path: any, sendData: any) {
|
||||
// const token = request.headers.authorization;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue