Skip to content

Commit

Permalink
refactor(online_judge)!: 修改比赛管理的API结构
Browse files Browse the repository at this point in the history
  • Loading branch information
XYCode-Kerman committed Apr 16, 2024
1 parent 9b3b665 commit ea283c9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions online_judge/contests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .base import router
6 changes: 6 additions & 0 deletions online_judge/contests/base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from fastapi import APIRouter

from .manager import router as manager_router

router = APIRouter(prefix='/contests', tags=['比赛'])
router.include_router(manager_router)
10 changes: 5 additions & 5 deletions online_judge/contests.py → online_judge/contests/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@

import ccf_parser

from .auth import require_role
from .oj_models import OJContest
from .utils import contestscol
from .utils.dependencies import require_ccf_file
from ..auth import require_role
from ..oj_models import OJContest
from ..utils import contestscol
from ..utils.dependencies import require_ccf_file

router = APIRouter(prefix='/contests', tags=['比赛'])
router = APIRouter(prefix='/manage')


@router.get('/', name='获取注册在 OJ 中的比赛', response_model=List[OJContest])
Expand Down

0 comments on commit ea283c9

Please sign in to comment.