mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-24 12:35:31 +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> {
|
||||
try {
|
||||
let res = await axios.post(API_URL + '/candidate/login', data, {withCredentials: true});
|
||||
return data.application_id;
|
||||
return data.applicationId;
|
||||
} catch (e: any) {
|
||||
throw errorHandler(e, "Login failed");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
async function submit() {
|
||||
try {
|
||||
await login({application_id: applicationId, password: codeValueMobile});
|
||||
await login({applicationId, password: codeValueMobile});
|
||||
goto("/register");
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ export interface CandidateData {
|
|||
}
|
||||
|
||||
export interface CandidateLogin {
|
||||
application_id: number;
|
||||
applicationId: number;
|
||||
password: string;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue