aboutsummaryrefslogtreecommitdiff
path: root/server/api/bids.py
blob: 24e2fa07eb3a2cd955c8c9a3745c5b4f5cb6df75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from fastapi import APIRouter
from models.bid import Bid
from typing import List

router = APIRouter()

fake_bid_store: List[Bid] = []

@router.get("/", response_model=List[Bid])
def get_bids():
    return fake_bid_store

@router.post("/", response_model=Bid)
def submit_bid(bid: Bid):
    fake_bid_store.append(bid)
    return bid