15 lines
387 B
Python
Executable File
15 lines
387 B
Python
Executable File
from fastapi import APIRouter, Request
|
|
|
|
router = APIRouter()
|
|
|
|
@router.get("/provider/inbox")
|
|
def provider_inbox(request: Request, provider_id: str):
|
|
cur = request.state.db.cursor()
|
|
cur.execute("""
|
|
SELECT * FROM app.v_provider_inbox
|
|
WHERE provider_listing_id = %s
|
|
ORDER BY created_at DESC
|
|
""", (provider_id,))
|
|
rows = cur.fetchall()
|
|
return rows
|