Apply new eslint rules; default to prettier for styling

This commit is contained in:
DaneEveritt 2022-06-26 15:13:52 -04:00
parent f22cce8881
commit dc84af9937
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
218 changed files with 3876 additions and 3564 deletions

View file

@ -15,12 +15,14 @@ export interface LoginData {
export default ({ username, password, recaptchaData }: LoginData): Promise<LoginResponse> => {
return new Promise((resolve, reject) => {
http.get('/sanctum/csrf-cookie')
.then(() => http.post('/auth/login', {
user: username,
password,
'g-recaptcha-response': recaptchaData,
}))
.then(response => {
.then(() =>
http.post('/auth/login', {
user: username,
password,
'g-recaptcha-response': recaptchaData,
})
)
.then((response) => {
if (!(response.data instanceof Object)) {
return reject(new Error('An error occurred while processing the login request.'));
}

View file

@ -6,12 +6,14 @@ export default (token: string, code: string, recoveryToken?: string): Promise<Lo
http.post('/auth/login/checkpoint', {
confirmation_token: token,
authentication_code: code,
recovery_token: (recoveryToken && recoveryToken.length > 0) ? recoveryToken : undefined,
recovery_token: recoveryToken && recoveryToken.length > 0 ? recoveryToken : undefined,
})
.then(response => resolve({
complete: response.data.data.complete,
intended: response.data.data.intended || undefined,
}))
.then((response) =>
resolve({
complete: response.data.data.complete,
intended: response.data.data.intended || undefined,
})
)
.catch(reject);
});
};

View file

@ -19,10 +19,12 @@ export default (email: string, data: Data): Promise<PasswordResetResponse> => {
password: data.password,
password_confirmation: data.passwordConfirmation,
})
.then(response => resolve({
redirectTo: response.data.redirect_to,
sendToLogin: response.data.send_to_login,
}))
.then((response) =>
resolve({
redirectTo: response.data.redirect_to,
sendToLogin: response.data.send_to_login,
})
)
.catch(reject);
});
};

View file

@ -3,7 +3,7 @@ import http from '@/api/http';
export default (email: string, recaptchaData?: string): Promise<string> => {
return new Promise((resolve, reject) => {
http.post('/auth/password', { email, 'g-recaptcha-response': recaptchaData })
.then(response => resolve(response.data.status || ''))
.then((response) => resolve(response.data.status || ''))
.catch(reject);
});
};