File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
components/authentication Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -11,15 +11,15 @@ import { ref } from 'vue';
1111import { useRouter } from ' vue-router' ;
1212import { useCookie } from ' #app' ;
1313
14- const config = useRuntimeConfig ();
14+ const { public : { apiBaseUrl } } = useRuntimeConfig ();
1515const router = useRouter ();
1616
1717const email = ref (' ' );
1818const password = ref (' ' );
1919
2020const login = async () => {
2121 try {
22- const data = await fetch (` ${ config . public . apiBaseUrl } /auth/login` , {
22+ const data = await fetch (` ${ apiBaseUrl} /auth/login` , {
2323 method: ' POST' ,
2424 headers: { ' Content-Type' : ' application/json' },
2525 body: JSON .stringify ({
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ import { ref } from 'vue';
3131import IconShow from ' @/assets/icons/eye.svg' ;
3232import IconHide from ' @/assets/icons/eye-off.svg' ;
3333
34- const config = useRuntimeConfig ();
34+ const { public : { apiBaseUrl } } = useRuntimeConfig ();
3535
3636const username = ref (' ' );
3737const email = ref (' ' );
@@ -55,7 +55,7 @@ const register = async () => {
5555 }
5656
5757 try {
58- const response = await fetch (` ${ config . public . apiBaseUrl } /auth/register` , {
58+ const response = await fetch (` ${ apiBaseUrl} /auth/register` , {
5959 method: ' POST' ,
6060 headers: { ' Content-Type' : ' application/json' },
6161 body: JSON .stringify ({
You can’t perform that action at this time.
0 commit comments