File tree Expand file tree Collapse file tree 4 files changed +6
-11
lines changed Expand file tree Collapse file tree 4 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export async function createList(listData) {
21
21
) ;
22
22
return response . data ;
23
23
} catch ( error ) {
24
- console . error ( 'Error creating list:' , error ) ;
24
+ console . warn ( 'Error creating list:' , error , ... arguments ) ;
25
25
throw error ;
26
26
}
27
27
}
@@ -42,7 +42,7 @@ export async function deleteList(listId) {
42
42
} ) ;
43
43
return response . data ;
44
44
} catch ( error ) {
45
- console . error ( 'Error deleting list:' , error ) ;
45
+ console . warn ( 'Error deleting list:' , error , ... arguments ) ;
46
46
throw error ;
47
47
}
48
48
}
Original file line number Diff line number Diff line change @@ -30,12 +30,7 @@ export default {
30
30
methods: {
31
31
validateInput (event ) {
32
32
const num = Number (event .target .value );
33
-
34
- if (isNaN (num) || num <= 0 ) {
35
- this .minutes = ' ' ; // Reset to empty if invalid
36
- } else {
37
- this .minutes = num; // Set valid number as minutes
38
- }
33
+ this .minutes = (num > 0 ? num : ' ' );
39
34
40
35
// Emit update:modelValue to enable two-way binding
41
36
this .$emit (' update:modelValue' , String (this .minutes ));
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ const router = createRouter({
29
29
} ) ;
30
30
31
31
// Navigation guard for protected routes
32
- router . beforeEach ( ( to , from , next ) => {
32
+ router . beforeEach ( function beforeEach ( to , from , next ) {
33
33
const isAuthenticated = store . state . isAuthenticated ; // Get auth status from Vuex
34
34
35
35
if ( to . matched . some ( record => record . meta . requiresAuth ) ) {
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ const store = createStore({
36
36
commit ( 'SET_SESSION_ID' , sessionId ) ;
37
37
}
38
38
} catch ( error ) {
39
- console . error ( 'Not authenticated:' , error ) ;
39
+ console . warn ( 'Not authenticated:' , error , ... arguments ) ;
40
40
commit ( 'LOGOUT' ) ;
41
41
}
42
42
} ,
@@ -45,7 +45,7 @@ const store = createStore({
45
45
await axios . post ( '/auth/logout' ) ;
46
46
commit ( 'LOGOUT' ) ;
47
47
} catch ( error ) {
48
- console . error ( 'Logout error:' , error ) ;
48
+ console . warn ( 'Logout error:' , error , ... arguments ) ;
49
49
}
50
50
} ,
51
51
} ,
You can’t perform that action at this time.
0 commit comments