Skip to content

Commit 7993a9d

Browse files
author
Ayshwarya Jagadeesan
committed
adding getproviderinfo
1 parent 35ccbca commit 7993a9d

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

main.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from http.client import HTTPException
22
from typing import List
3-
from fastapi import FastAPI
3+
from fastapi import FastAPI,Request
44
from uuid import UUID,uuid4
55
from models import User,Gender,Role, UserUpdateRequest
66
app = FastAPI()
@@ -56,6 +56,13 @@ async def update_user(user_update:UserUpdateRequest,user_id:UUID):
5656
status_code=404,
5757
detail=f"user withid:{user_id} does not exists"
5858
)
59+
@app.post("/getproviderinfo")
60+
async def getproviderinfo(info:Request):
61+
req_info =await info.json()
62+
return {
63+
"status":"Success",
64+
"data":req_info
65+
}
5966

6067

6168

0 commit comments

Comments
 (0)