mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-27 05:51:56 +00:00
feat: camelCase compatible API
This commit is contained in:
parent
e8328f94a3
commit
fb1c83c6a8
3 changed files with 3 additions and 3 deletions
|
|
@ -6,7 +6,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});
|
let res = await axios.post(API_URL + '/candidate/login', data, {withCredentials: true});
|
||||||
return data.application_id;
|
return data.applicationId;
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
throw errorHandler(e, "Login failed");
|
throw errorHandler(e, "Login failed");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
async function submit() {
|
async function submit() {
|
||||||
try {
|
try {
|
||||||
await login({application_id: applicationId, password: codeValueMobile});
|
await login({applicationId, password: codeValueMobile});
|
||||||
goto("/register");
|
goto("/register");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ export interface CandidateData {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CandidateLogin {
|
export interface CandidateLogin {
|
||||||
application_id: number;
|
applicationId: number;
|
||||||
password: string;
|
password: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue