diff --git a/app/assets/img/incorrect-password.gif b/app/assets/img/incorrect-password.gif deleted file mode 100644 index 8ea4b63..0000000 Binary files a/app/assets/img/incorrect-password.gif and /dev/null differ diff --git a/app/components/forms/auth/login-form.vue b/app/components/forms/auth/login-form.vue index 7b49279..3b0a8fc 100644 --- a/app/components/forms/auth/login-form.vue +++ b/app/components/forms/auth/login-form.vue @@ -1,19 +1,9 @@ \ No newline at end of file diff --git a/app/components/forms/auth/registration-form.vue b/app/components/forms/auth/registration-form.vue index a4a98ac..2c16f70 100644 --- a/app/components/forms/auth/registration-form.vue +++ b/app/components/forms/auth/registration-form.vue @@ -5,36 +5,27 @@ const {register} = useAuth(); const username = ref(""); const email = ref(""); -const errorMessage = ref(""); -const handleRegistration = async () => { - try { - await register(email.value, username.value); - } catch (error: any) { - console.error(error); - errorMessage.value = error.message; - } +const handleRegistration = () => { + register(email.value, username.value); } \ No newline at end of file diff --git a/app/composables/useAuth.ts b/app/composables/useAuth.ts index 6c0fd76..55bfbc7 100644 --- a/app/composables/useAuth.ts +++ b/app/composables/useAuth.ts @@ -6,16 +6,7 @@ export const useAuth = () => { baseURL: config.public.apiBase, credentials: 'include', }) - await $api('/api/login', { - method: 'POST', - onResponseError({response}) { - if (response.status === 401) { - throw new Error('INVALID_CREDENTIALS') - } - }, - body: {email, password} - } - ) + await $api('/api/login', {method: 'POST', body: {email, password}}) window.location.href = '/lists' } @@ -24,16 +15,7 @@ export const useAuth = () => { baseURL: config.public.apiBase, credentials: 'include', }) - await $api('/api/register', { - method: 'POST', - onResponseError({response}) { - console.log("wat", response) - if (response.status === 422) { - throw new Error(response._data.message) - } - }, - body: {email, username} - }) + await $api('/api/register', {method: 'POST', body: {email, username}}) await navigateTo('/auth/login') } diff --git a/app/pages/invitations/[token]/accept.vue b/app/pages/invitations/[token]/accept.vue index 6a775aa..c8bcafc 100644 --- a/app/pages/invitations/[token]/accept.vue +++ b/app/pages/invitations/[token]/accept.vue @@ -1,19 +1,26 @@ \ No newline at end of file diff --git a/app/types/invitation-status.ts b/app/types/invitation-status.ts deleted file mode 100644 index 496e463..0000000 --- a/app/types/invitation-status.ts +++ /dev/null @@ -1,13 +0,0 @@ -export enum InviteStatusEnum { - PENDING = "pending", - ACCEPTED = "accepted", - DECLINED = "declined", - NOT_FOUND = "not_found", - FAILED = "failed", -} - -export type InviteStatus = { - message: string - status: InviteStatusEnum -} -