mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-24 12:35:31 +00:00
feat: use const everywhere
This commit is contained in:
parent
4f41867e25
commit
d1d6920a41
1 changed files with 3 additions and 3 deletions
|
|
@ -5,7 +5,7 @@ import { API_URL, errorHandler } from ".";
|
|||
|
||||
export async function apiLogin(data: CandidateLogin): Promise<number> {
|
||||
try {
|
||||
let res = await axios.post(API_URL + '/candidate/login', data, {withCredentials: true});
|
||||
const res = await axios.post(API_URL + '/candidate/login', data, {withCredentials: true});
|
||||
return data.applicationId;
|
||||
} catch (e: any) {
|
||||
throw errorHandler(e, "Login failed");
|
||||
|
|
@ -24,7 +24,7 @@ export async function apiLogout() {
|
|||
export async function apiFillDetails(data: CandidateData): Promise<CandidateData> {
|
||||
console.log(data);
|
||||
try {
|
||||
let res = await axios.post(API_URL + '/candidate/details', data, {withCredentials: true});
|
||||
const res = await axios.post(API_URL + '/candidate/details', data, {withCredentials: true});
|
||||
return res.data;
|
||||
} catch (e: any) {
|
||||
throw errorHandler(e, "Failed to fill details");
|
||||
|
|
@ -33,7 +33,7 @@ export async function apiFillDetails(data: CandidateData): Promise<CandidateData
|
|||
|
||||
export async function apiFetchDetails(): Promise<CandidateData> {
|
||||
try {
|
||||
let res = await axios.get(API_URL + '/candidate/details', {withCredentials: true});
|
||||
const res = await axios.get(API_URL + '/candidate/details', {withCredentials: true});
|
||||
return res.data;
|
||||
} catch (e: any) {
|
||||
throw errorHandler(e, "Failed to fill details");
|
||||
|
|
|
|||
Loading…
Reference in a new issue