Docstring документация моделей сервера
This commit is contained in:
parent
d80adfb2e0
commit
1b0d18b681
7 changed files with 184 additions and 13 deletions
|
|
@ -1,16 +1,13 @@
|
|||
from fastapi import APIRouter, HTTPException
|
||||
from typing import List
|
||||
from pydantic import BaseModel
|
||||
from typing import List, Dict
|
||||
from models.subnet import SubnetScanResult
|
||||
from models.wifi import WifiScanResult
|
||||
from models.request import NoteRequest
|
||||
from services.subnet_service import SubnetService
|
||||
from services.wifi_service import WifiService
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
class NoteRequest(BaseModel):
|
||||
note: str
|
||||
|
||||
@router.get("/scan", response_model=SubnetScanResult)
|
||||
def scan_subnet(subnet: str = "192.168.1.0/24", ports: List[int] = None):
|
||||
"""Сканирует локальную подсеть и возвращает данные об устройствах"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue