Spaces:
Sleeping
Sleeping
from fastapi import FastAPI , Request, APIRouter, Depends, HTTPException | |
from starlette.middleware.cors import CORSMiddleware | |
from routers import receipt_radar_callback_router | |
app = FastAPI() | |
app.add_middleware( | |
CORSMiddleware, | |
allow_origins=["*"], | |
allow_credentials=True, | |
allow_methods=["DELETE", "GET", "POST", "PUT"], | |
allow_headers=["*"], | |
) | |
app = FastAPI() | |
async def test(request:Request): | |
body = await request.json() | |
print(body.get('refresh_token',None)) | |
print("URL endpoint hit !!") | |
return {"access_token":"abcd"} | |
async def test2(request:Request): | |
body = await request.json() | |
print(body.get('access_token',None)) | |
print("Url endpoint test 2 hit !!") | |
return {"status":"True"} | |
app.include_router(receipt_radar_callback_router.router) |