add init to scripts
This commit is contained in:
parent
9ccbcbfc8d
commit
010e11b6f1
|
@ -0,0 +1,3 @@
|
||||||
|
from .check_available_ports import start_check as check_available_ports
|
||||||
|
|
||||||
|
__all__ = ["check_available_ports"]
|
|
@ -4,7 +4,7 @@ from starlette.responses import HTMLResponse
|
||||||
from starlette.templating import Jinja2Templates
|
from starlette.templating import Jinja2Templates
|
||||||
from config import TEMPLATES_DIR
|
from config import TEMPLATES_DIR
|
||||||
|
|
||||||
from scripts.сheck_available_ports import start_check
|
from scripts import check_available_ports
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ async def check_ports(request: Request):
|
||||||
@router.get("/start")
|
@router.get("/start")
|
||||||
async def start_check_ports(request: Request, inputText: str):
|
async def start_check_ports(request: Request, inputText: str):
|
||||||
|
|
||||||
results = start_check(inputText, result_type="text")
|
results = check_available_ports(inputText, result_type="text")
|
||||||
return templates.TemplateResponse(
|
return templates.TemplateResponse(
|
||||||
"body-check_ports.html",
|
"body-check_ports.html",
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue