Skip to content

Commit 4d6efd5

Browse files
committed
Рефакторинг
1 parent ec7a7ac commit 4d6efd5

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed

app/api/endpoints/admins/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from . import stats
99
from app.api import depends
10-
from app.api.tags import Tags
10+
from app.core.structures import Tags
1111

1212
router = APIRouter(
1313
prefix="/admins",

app/api/endpoints/tokens/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from fastapi import APIRouter
66

77
from . import auth, pair, refresh
8-
from app.api.tags import Tags
8+
from app.core.structures import Tags
99

1010
router = APIRouter(prefix="/tokens", tags=[Tags.tokens])
1111
router.include_router(auth.router)

app/api/endpoints/users/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from fastapi import APIRouter
66

77
from . import get, new
8-
from app.api.tags import Tags
8+
from app.core.structures import Tags
99

1010
router = APIRouter(prefix="/users", tags=[Tags.users])
1111
router.include_router(new.router)

app/api/tags.py

Lines changed: 0 additions & 7 deletions
This file was deleted.

app/core/structures.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from enum import IntEnum
1+
from enum import IntEnum, Enum
22

33

44
class Role(IntEnum):
@@ -10,3 +10,9 @@ class TokenType(IntEnum):
1010
AUTH = 0
1111
LONG = 1
1212
SHORT = 2
13+
14+
15+
class Tags(Enum):
16+
users = "users"
17+
tokens = "tokens"
18+
admins = "admins"

0 commit comments

Comments
 (0)