Initial commit - Migrated to Dev environment
This commit is contained in:
14
backend/app/api/recommend.py
Executable file
14
backend/app/api/recommend.py
Executable file
@@ -0,0 +1,14 @@
|
||||
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
|
||||
Reference in New Issue
Block a user