mirror of
https://github.com/StepanovPlaton/torrent_backend.git
synced 2026-04-03 12:20:38 +04:00
Small fixes
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
from fastapi import APIRouter
|
||||
from pathlib import Path
|
||||
|
||||
router = APIRouter()
|
||||
startup_router = APIRouter()
|
||||
|
||||
@router.on_event("startup")
|
||||
|
||||
@startup_router.on_event("startup")
|
||||
def startup():
|
||||
need_paths = [
|
||||
Path() / "content" / "images" / "cover" / "full_size",
|
||||
@@ -13,4 +14,4 @@ def startup():
|
||||
Path() / "content" / "torrent"
|
||||
]
|
||||
for path in need_paths:
|
||||
path.mkdir(parents=True, exist_ok=True)
|
||||
path.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
Reference in New Issue
Block a user