mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-24 12:35:31 +00:00
feat: add delete to api definitions
This commit is contained in:
parent
d74a66832f
commit
99a0253946
1 changed files with 10 additions and 0 deletions
|
|
@ -29,6 +29,16 @@ export const apiCreateCandidate = async (data: CreateCandidate): Promise<CreateC
|
|||
}
|
||||
};
|
||||
|
||||
// Deletes candidate /admin/candidate/{id}
|
||||
export const apiDeleteCandidate = async (id: number): Promise<string> => {
|
||||
try {
|
||||
const res = await axios.delete(API_URL + `/admin/candidate/${id}`, { withCredentials: true });
|
||||
return res.data;
|
||||
} catch (e) {
|
||||
throw errorHandler(e, 'Candidate creation failed');
|
||||
}
|
||||
};
|
||||
|
||||
// Reset candidate password /admin/candidate/{id}/reset_password
|
||||
export const apiResetCandidatePassword = async (id: number): Promise<CreateCandidateLogin> => {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in a new issue