diff --git a/frontend/src/api/users.js b/frontend/src/api/users.js index 9081398cd..33043c7b5 100644 --- a/frontend/src/api/users.js +++ b/frontend/src/api/users.js @@ -30,11 +30,12 @@ function deleteErrorText(response) { } export const userAPI = { async login(formData) { - let response = await apiReq.post(authURLs.token, formData, { - headers: { - "Content-Type": "application/x-www-form-urlencoded", - }, - }); + let response = await apiReq.post( + authURLs.token, + formData, + function() { return i18n.t('user.incorrect-username-or-password'); }, + function() { return i18n.t('user.user-successfully-logged-in'); } + ); return response; }, async refresh() { diff --git a/frontend/src/components/Login/LoginForm.vue b/frontend/src/components/Login/LoginForm.vue index 63ba2c768..52eca4c54 100644 --- a/frontend/src/components/Login/LoginForm.vue +++ b/frontend/src/components/Login/LoginForm.vue @@ -61,7 +61,6 @@