Skip to content

Commit

Permalink
Merge pull request #80 from Tux-Inc/develop
Browse files Browse the repository at this point in the history
hotfix(auth): frontend ssr request false
  • Loading branch information
AlexandreDFM authored Nov 6, 2023
2 parents 7a112e8 + ebdd8a0 commit 9e2b1a4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion frontend/pages/auth/confirm-email.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const toast = useToast();
async function confirmEmail() {
const { error } = await useFetch(
`${runtimeConfig.public.API_AUTH_BASE_URL}/api/auth/confirm-email`,
{ method: "POST", body: { confirmationToken } },
{ method: "POST", body: { confirmationToken }, server: false }
);
if (error.value) {
toast.add({
Expand Down
2 changes: 1 addition & 1 deletion frontend/pages/auth/forgot-password.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async function submit(event: FormSubmitEvent<any>) {
isLoading.value = true;
const { error } = await useFetch(
`${runtimeConfig.public.API_AUTH_BASE_URL}/api/auth/forgot-password`,
{ method: "POST", body: JSON.stringify(event.data) },
{ method: "POST", body: JSON.stringify(event.data), server: false },
);
if (error.value) {
isLoading.value = false;
Expand Down
6 changes: 2 additions & 4 deletions frontend/pages/auth/reset-password.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ const validate = (state: any): FormError[] => {
};

async function submit(event: FormSubmitEvent<any>) {
const { data, pending, error } = await useAsyncData<any, any>("user", () =>
$fetch(
`${runtimeConfig.public.API_AUTH_BASE_URL}/api/auth/reset-password`,
const { data, error } = await useFetch(
`${runtimeConfig.public.API_AUTH_BASE_URL}/api/auth/reset-password`,
{
method: "POST",
body: JSON.stringify({
Expand All @@ -80,7 +79,6 @@ async function submit(event: FormSubmitEvent<any>) {
resetToken: resetToken,
}),
},
),
);
if (error.value) {
toast.add({
Expand Down
2 changes: 1 addition & 1 deletion frontend/pages/auth/sign-in.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async function submit(event: FormSubmitEvent<any>) {
isLoading.value = true;
const { data, error } = await useFetch(
`${runtimeConfig.public.API_AUTH_BASE_URL}/api/auth/sign-in`,
{ method: "POST", body: JSON.stringify(event.data) },
{ method: "POST", body: JSON.stringify(event.data), server: false },
);
if (error.value) {
isLoading.value = false;
Expand Down
2 changes: 1 addition & 1 deletion frontend/pages/auth/sign-up.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async function submit(event: FormSubmitEvent<any>) {
isLoading.value = true;
const { error } = await useFetch(
`${runtimeConfig.public.API_AUTH_BASE_URL}/api/auth/sign-up`,
{ method: "POST", body: JSON.stringify(event.data) },
{ method: "POST", body: JSON.stringify(event.data), server: false },
);
if (error.value) {
isLoading.value = false;
Expand Down

0 comments on commit 9e2b1a4

Please sign in to comment.