fix:delete profileAvatar
All checks were successful
Build & Deploy on Dev / build (push) Successful in 53s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 53s
This commit is contained in:
parent
e461f43604
commit
633ccd4906
4 changed files with 67 additions and 0 deletions
|
|
@ -99,6 +99,23 @@ class CallAPI {
|
|||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
//Delete File
|
||||
public async DeleteFile(request: any, @Path() path: any) {
|
||||
const token = "Bearer " + request.headers.authorization.replace("Bearer ", "");
|
||||
const url = process.env.API_URL + "/salary/file/" + path;
|
||||
try {
|
||||
await axios.delete(url, {
|
||||
headers: {
|
||||
Authorization: `${token}`,
|
||||
"Content-Type": "application/json",
|
||||
api_key: process.env.API_KEY,
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default CallAPI;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue