From fa21cf5661dcff6160dde0e1e3de2d8dba9b1fdc Mon Sep 17 00:00:00 2001 From: Iam54r1n4 Date: Thu, 30 Jan 2025 20:35:42 +0000 Subject: [PATCH] Refactor singbox endpoints --- core/scripts/webpanel/routers/api/v1/config/singbox.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/scripts/webpanel/routers/api/v1/config/singbox.py b/core/scripts/webpanel/routers/api/v1/config/singbox.py index a3976c7..eec2459 100644 --- a/core/scripts/webpanel/routers/api/v1/config/singbox.py +++ b/core/scripts/webpanel/routers/api/v1/config/singbox.py @@ -6,7 +6,7 @@ import cli_api router = APIRouter() -@router.get('/start', response_model=DetailResponse) +@router.post('/start', response_model=DetailResponse, summary='Start Singbox') async def start(body: StartInputBody): """ Start the Singbox service. @@ -26,8 +26,8 @@ async def start(body: StartInputBody): raise HTTPException(status_code=400, detail=f'Error: {str(e)}') -@router.get('/stop', response_model=DetailResponse) -async def stop(): +@router.get('/stop', response_model=DetailResponse, summary='Stop Singbox') +async def delete(): """ Stop the Singbox service.