mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-09 01:30:18 +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> {
|
export async function apiLogin(data: CandidateLogin): Promise<number> {
|
||||||
try {
|
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;
|
return data.applicationId;
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
throw errorHandler(e, "Login failed");
|
throw errorHandler(e, "Login failed");
|
||||||
|
|
@ -24,7 +24,7 @@ export async function apiLogout() {
|
||||||
export async function apiFillDetails(data: CandidateData): Promise<CandidateData> {
|
export async function apiFillDetails(data: CandidateData): Promise<CandidateData> {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
try {
|
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;
|
return res.data;
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
throw errorHandler(e, "Failed to fill details");
|
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> {
|
export async function apiFetchDetails(): Promise<CandidateData> {
|
||||||
try {
|
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;
|
return res.data;
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
throw errorHandler(e, "Failed to fill details");
|
throw errorHandler(e, "Failed to fill details");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue