11 lines
315 B
Python
11 lines
315 B
Python
from fastapi import APIRouter, status
|
|
from typing import List
|
|
from helpers.ship_helpers import get_ship_names
|
|
|
|
router = APIRouter()
|
|
|
|
@router.post("/names", status_code=status.HTTP_200_OK, response_model=List[str])
|
|
async def get_names():
|
|
"""Get list of ship names"""
|
|
names = get_ship_names()
|
|
return names |