File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ const useAuthStore = defineStore('authStore', () => {
41
41
if ( token ) {
42
42
// Make the logout request to the backend with the token in the headers
43
43
await axios . post (
44
- 'http ://localhost:5000 /api/logout' ,
44
+ 'https ://backend-aurh-production.up.railway.app /api/logout' ,
45
45
{ } ,
46
46
{
47
47
headers : {
@@ -68,7 +68,7 @@ const useAuthStore = defineStore('authStore', () => {
68
68
69
69
if ( token ) {
70
70
try {
71
- const res = await axios . post ( 'http ://localhost:5000 /api/auth' , { token } ) ;
71
+ const res = await axios . post ( 'https ://backend-aurh-production.up.railway.app /api/auth' , { token } ) ;
72
72
user_info . value = res . data . data as UserInfo ;
73
73
return true ; // User is authenticated
74
74
} catch ( error ) {
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import { Button } from '@/components/ui/button';
14
14
import { h } from ' vue' ;
15
15
16
16
import { ref } from ' vue' ;
17
- import { RouterLink , useRouter } from ' vue-router' ;
17
+ import { RouterLink } from ' vue-router' ;
18
18
import axios from ' axios' ;
19
19
import { useToast } from ' @/components/ui/toast/use-toast'
20
20
import { Toaster , ToastAction } from ' @/components/ui/toast'
@@ -42,7 +42,7 @@ const errors = ref({
42
42
});
43
43
44
44
const showPassword = ref (false );
45
- const router = useRouter ();
45
+
46
46
47
47
const validateForm = () => {
48
48
let valid = true ;
@@ -66,7 +66,7 @@ const validateForm = () => {
66
66
67
67
const onSubmit = async () => {
68
68
if (! validateForm ()) return ;
69
- axios .post (' http ://localhost:5000 /api/login' , {
69
+ axios .post (' https ://backend-aurh-production.up.railway.app /api/login' , {
70
70
email: form .value .email .trim (),
71
71
password: form .value .password .trim ()
72
72
},
@@ -77,7 +77,7 @@ const onSubmit = async () => {
77
77
})
78
78
.then ((res ) => {
79
79
authStore .setAuthentication (res .data .token )
80
- router . push ( ' / ' )
80
+ location . reload ();
81
81
})
82
82
.catch ((err ) => {
83
83
toast ({
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ const onSubmit = async () => {
79
79
if (! validateForm ()) return
80
80
loading .value = true
81
81
82
- axios .post (' http ://localhost:5000 /api/signup' , {
82
+ axios .post (' https ://backend-aurh-production.up.railway.app /api/signup' , {
83
83
fullname: form .value .name .trim (),
84
84
email: form .value .email .trim (),
85
85
password: form .value .password .trim ()
You can’t perform that action at this time.
0 commit comments