mirror of
https://github.com/DrizzleTime/Foxel.git
synced 2026-07-12 16:03:27 +08:00
refactor: remove Permission model and update related code to use permission codes
This commit is contained in:
2
main.py
2
main.py
@@ -21,6 +21,7 @@ from middleware.exception_handler import (
|
||||
import httpx
|
||||
from dotenv import load_dotenv
|
||||
from domain.tasks import task_queue_service, task_scheduler
|
||||
from domain.role.service import RoleService
|
||||
|
||||
load_dotenv()
|
||||
|
||||
@@ -66,6 +67,7 @@ async def lifespan(app: FastAPI):
|
||||
os.makedirs("data/db", exist_ok=True)
|
||||
os.makedirs("data/plugins", exist_ok=True)
|
||||
await init_db()
|
||||
await RoleService.ensure_system_roles()
|
||||
await runtime_registry.refresh()
|
||||
await ConfigService.set("APP_VERSION", VERSION)
|
||||
await task_queue_service.start_worker()
|
||||
|
||||
Reference in New Issue
Block a user