From 675a07513ec231c05317179dda908059bbfa917c Mon Sep 17 00:00:00 2001 From: Iam54r1n4 Date: Thu, 30 Jan 2025 20:35:23 +0000 Subject: [PATCH] Refactor normalsub endpoints --- core/scripts/webpanel/routers/api/v1/config/normalsub.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/scripts/webpanel/routers/api/v1/config/normalsub.py b/core/scripts/webpanel/routers/api/v1/config/normalsub.py index 356f80f..bb39ea2 100644 --- a/core/scripts/webpanel/routers/api/v1/config/normalsub.py +++ b/core/scripts/webpanel/routers/api/v1/config/normalsub.py @@ -6,7 +6,7 @@ import cli_api router = APIRouter() -@router.get('/start', response_model=DetailResponse) +@router.post('/start', response_model=DetailResponse, summary='Start NormalSub') async def start(body: StartInputBody): """ Starts the NormalSub service using the provided domain and port. @@ -31,7 +31,7 @@ async def start(body: StartInputBody): raise HTTPException(status_code=400, detail=f'Error: {str(e)}') -@router.get('/stop', response_model=DetailResponse) +@router.delete('/stop', response_model=DetailResponse, summary='Stop NormalSub') async def stop(): """ Stops the NormalSub service.