feat: use const everywhere

This commit is contained in:
EETagent 2022-12-02 15:30:28 +01:00
parent 4f41867e25
commit d1d6920a41

View file

@ -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");