Skip to content

Commit 43bce30

Browse files
committed
remove comments
1 parent cc26eeb commit 43bce30

4 files changed

Lines changed: 1 addition & 10 deletions

File tree

frontend/src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import router from './router'
44
import authService from './services/auth'
55
import './style.css'
66

7-
// Настроить axios interceptor для автоматической авторизации
7+
88
authService.setupAxiosInterceptor()
99

1010
const app = createApp(App)

frontend/src/router/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,11 @@ const router = createRouter({
3535
router.beforeEach((to, from, next) => {
3636
const isAuthenticated = authService.isAuthenticated()
3737

38-
// Если маршрут требует авторизации
3938
if (to.meta.requiresAuth && !isAuthenticated) {
4039
next('/login')
4140
return
4241
}
4342

44-
// Если пользователь авторизован и пытается зайти на login/register
4543
if (to.meta.guest && isAuthenticated) {
4644
next('/')
4745
return

frontend/src/services/auth.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ class AuthService {
88
this.user = JSON.parse(localStorage.getItem('user') || 'null')
99
}
1010

11-
// Регистрация
1211
async register(email, password) {
1312
const response = await axios.post(`${API_URL}/auth/register`, {
1413
email,
@@ -17,7 +16,6 @@ class AuthService {
1716
return response.data
1817
}
1918

20-
// Вход
2119
async login(email, password) {
2220
const formData = new URLSearchParams()
2321
formData.append('username', email)
@@ -56,7 +54,6 @@ class AuthService {
5654
}
5755
}
5856

59-
// Выход
6057
async logout() {
6158
try {
6259
if (this.token) {
@@ -76,17 +73,14 @@ class AuthService {
7673
}
7774
}
7875

79-
// Проверка авторизации
8076
isAuthenticated() {
8177
return !!this.token
8278
}
8379

84-
// Получить пользователя
8580
getUser() {
8681
return this.user
8782
}
8883

89-
// Настроить axios interceptor для автоматической авторизации
9084
setupAxiosInterceptor() {
9185
axios.interceptors.request.use(
9286
config => {

frontend/src/style.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@import "tailwindcss";
22

33
@theme {
4-
/* Здесь можно добавить кастомные настройки если нужно */
54
}
65

76
/* Base styles */

0 commit comments

Comments
 (0)