diff --git a/src/api.js b/src/api.js index c029d81..8034527 100644 --- a/src/api.js +++ b/src/api.js @@ -21,7 +21,7 @@ export async function createList(listData) { ); return response.data; } catch (error) { - console.error('Error creating list:', error); + console.warn('Error creating list:', error,...arguments); throw error; } } @@ -42,7 +42,7 @@ export async function deleteList(listId) { }); return response.data; } catch (error) { - console.error('Error deleting list:', error); + console.warn('Error deleting list:', error,...arguments); throw error; } } diff --git a/src/components/ListItems/MinuteInput.vue b/src/components/ListItems/MinuteInput.vue index 2f8c807..6fb41b2 100644 --- a/src/components/ListItems/MinuteInput.vue +++ b/src/components/ListItems/MinuteInput.vue @@ -30,12 +30,7 @@ export default { methods: { validateInput(event) { const num = Number(event.target.value); - - if (isNaN(num) || num <= 0) { - this.minutes = ''; // Reset to empty if invalid - } else { - this.minutes = num; // Set valid number as minutes - } + this.minutes = (num > 0 ? num : ''); // Emit update:modelValue to enable two-way binding this.$emit('update:modelValue', String(this.minutes)); diff --git a/src/router/index.js b/src/router/index.js index a917de4..202cd76 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -29,7 +29,7 @@ const router = createRouter({ }); // Navigation guard for protected routes -router.beforeEach((to, from, next) => { +router.beforeEach(function beforeEach(to, from, next) { const isAuthenticated = store.state.isAuthenticated; // Get auth status from Vuex if (to.matched.some(record => record.meta.requiresAuth)) { diff --git a/src/store.js b/src/store.js index 7e7733f..7e30131 100644 --- a/src/store.js +++ b/src/store.js @@ -36,7 +36,7 @@ const store = createStore({ commit('SET_SESSION_ID', sessionId); } } catch (error) { - console.error('Not authenticated:', error); + console.warn('Not authenticated:', error,...arguments); commit('LOGOUT'); } }, @@ -45,7 +45,7 @@ const store = createStore({ await axios.post('/auth/logout'); commit('LOGOUT'); } catch (error) { - console.error('Logout error:', error); + console.warn('Logout error:', error,...arguments); } }, },