1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

починка админки5

This commit is contained in:
MoonTestUse1
2025-01-04 00:08:39 +06:00
parent 52ff636ff0
commit fc713cf120
2 changed files with 2 additions and 9 deletions

View File

@@ -19,7 +19,7 @@ app.add_middleware(
)
# Include routers
app.include_router(auth.router, prefix="/auth", tags=["auth"])
app.include_router(auth.router, prefix="/api/auth", tags=["auth"])
app.include_router(admin.router, prefix="/api/admin", tags=["admin"])
app.include_router(employees.router, prefix="/api/employees", tags=["employees"])
app.include_router(requests.router, prefix="/api/requests", tags=["requests"])

View File

@@ -11,7 +11,7 @@ from ..utils.auth import verify_password
from ..utils.jwt import create_and_save_token
router = APIRouter()
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="login")
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/api/auth/login")
@router.post("/login", response_model=Token)
async def login_for_access_token(
@@ -57,10 +57,3 @@ async def admin_login(
"token_type": "bearer"
}
def find_unique(nested, threshold):
unique = set() # Создаем пустое множество
for sublist in nested:
for num in sublist:
if num > threshold:
unique.add(num)
return unique