zmiana endpointów; poprawki designu

This commit is contained in:
2023-11-29 14:22:58 +01:00
parent c5b639b068
commit 6d4d6077af
7 changed files with 62 additions and 103 deletions
+4 -13
View File
@@ -8,11 +8,10 @@
import { defineComponent } from 'vue';
import PopUpCard from './components/PopUpCard.vue';
import { RouterView } from 'vue-router';
import { AuthState } from './types/types';
import { baseURL, useStore } from './store';
import { useStore } from './store';
import useLocalStorage from './mixins/useLocalStorage';
import axios from 'axios';
import { IUser } from './types/types';
import client from './common/http';
export default defineComponent({
components: { PopUpCard },
@@ -33,14 +32,7 @@ export default defineComponent({
try {
this.tokenLoading = true;
const response = await axios.post<IUser>(
'/auth/token',
{},
{
baseURL,
withCredentials: true,
}
);
const response = await client.post<IUser>('/auth/token');
this.store.setUserData(response.data);
this.$router.push('/');
@@ -96,7 +88,7 @@ button {
outline: none;
border: none;
background-color: #000000;
background-color: #0066ff;
color: white;
padding: 0.5rem 0.75rem;
@@ -164,4 +156,3 @@ button {
background: #aaa;
}
</style>