Removed console.log and reduced timeout
This commit is contained in:
@@ -8,7 +8,7 @@ export default {
|
||||
install: (app) => {
|
||||
const axiosInstance = axios.create({
|
||||
baseURL: 'https://localhost:5001/',
|
||||
timeout: 5000,
|
||||
timeout: 2000,
|
||||
});
|
||||
|
||||
axiosInstance.interceptors.request.use((config) => {
|
||||
@@ -22,7 +22,6 @@ export default {
|
||||
});
|
||||
|
||||
app.provide(clientKey, axiosInstance);
|
||||
console.log("client provided");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -48,7 +48,6 @@ const client = useClient();
|
||||
const router = useRouter()
|
||||
|
||||
let user = ref({});
|
||||
|
||||
let errorSnackBar = ref(false);
|
||||
|
||||
const goHome = () => {
|
||||
@@ -60,7 +59,6 @@ async function login(){
|
||||
await authStore.login(client, user.value.email, user.value.password)
|
||||
router.push('/');
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
errorSnackBar.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
|
||||
<script async setup>
|
||||
import DefaultLayout from '@/layouts/DefaultLayout.vue';
|
||||
import { ref } from 'vue'
|
||||
import { useClient } from '@/plugins/clientPlugin';
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
const router = useRouter()
|
||||
const client = useClient();
|
||||
@@ -58,12 +58,10 @@ async function callBackend() {
|
||||
const response = await client.get('/api/TodoItems?ListId=1&PageNumber=1&PageSize=10');
|
||||
const responseItems = response.data.items;
|
||||
const orderedResponseItems = responseItems.sort((a, b) => a.id - b.id);
|
||||
console.log(orderedResponseItems);
|
||||
itemList.value = orderedResponseItems
|
||||
|
||||
} catch (error) {
|
||||
errorNoAccessSnackBar.value = true;
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user