- Added all seven issued service trees without omissions. - Preserved the supplied runtime configuration, binaries, and assets.
15 lines
428 B
Python
Executable File
15 lines
428 B
Python
Executable File
from fastapi import APIRouter
|
|
|
|
from backend.app.db import operations
|
|
from backend.app.api.schemas import ReceiptOpen
|
|
|
|
router = APIRouter(prefix="/api/receipts", tags=["receipts"])
|
|
|
|
@router.get("")
|
|
async def receipts():
|
|
return await operations.receipts()
|
|
|
|
@router.post("/{receipt_id}/open")
|
|
async def receipt_open(receipt_id: int, body: ReceiptOpen):
|
|
return await operations.open_receipt(receipt_id, body.calculation_id)
|