fix report kk1/kp7 : add field imgUrl
This commit is contained in:
parent
917ca75eb2
commit
2d5f719fe2
3 changed files with 59 additions and 4 deletions
|
|
@ -31,6 +31,23 @@ class CallAPI {
|
|||
throw error;
|
||||
}
|
||||
}
|
||||
//Get (response.data)
|
||||
public async GetData2(request: any, @Path() path: any) {
|
||||
const token = request.headers.authorization;
|
||||
const url = process.env.API_URL + path;
|
||||
try {
|
||||
const response = await axios.get(url, {
|
||||
headers: {
|
||||
Authorization: `${token}`,
|
||||
"Content-Type": "application/json",
|
||||
api_key: process.env.API_KEY,
|
||||
},
|
||||
});
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
//Post
|
||||
public async PostData(request: any, @Path() path: any, sendData: any) {
|
||||
const token = request.headers.authorization;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue