Add Get endpoint for /norway
This commit is contained in:
parent
cc433fcc0a
commit
68fd238279
18
endpoints/norway.get.py
Normal file
18
endpoints/norway.get.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Entity: Lake
|
||||
|
||||
from fastapi import APIRouter, status
|
||||
from typing import List
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@router.get("/norway", status_code=200, response_model=List[LakeSchema])
|
||||
def get_lakes_norway():
|
||||
from models.lake import Lake
|
||||
lakes = [
|
||||
Lake(name="Mjøsa", area=365, max_depth=453),
|
||||
Lake(name="Femund", area=204, max_depth=153),
|
||||
Lake(name="Krøderen", area=132, max_depth=119),
|
||||
Lake(name="Randsfjorden", area=139, max_depth=126),
|
||||
Lake(name="Tyrifjorden", area=121, max_depth=295),
|
||||
]
|
||||
return lakes
|
Loading…
x
Reference in New Issue
Block a user