Update app.py
Browse files
app.py
CHANGED
|
@@ -105,6 +105,8 @@ def create_item(data: Item):
|
|
| 105 |
|
| 106 |
return {"status":False}
|
| 107 |
|
|
|
|
|
|
|
| 108 |
@app.post("/checkaccount")
|
| 109 |
def checkaccount(data:Item):
|
| 110 |
status=checkAccount(data.owner)
|
|
@@ -113,6 +115,11 @@ def checkaccount(data:Item):
|
|
| 113 |
return {'status':True}
|
| 114 |
else:
|
| 115 |
return {"status":False}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
|
| 117 |
|
| 118 |
@app.post("/checkfile")
|
|
@@ -121,6 +128,9 @@ def checkfileexistence(data:Item2):
|
|
| 121 |
return filechecksresponse
|
| 122 |
|
| 123 |
|
|
|
|
|
|
|
|
|
|
| 124 |
|
| 125 |
@app.post("/checkproblems")
|
| 126 |
def checkProblems(data:QA4):
|
|
@@ -128,12 +138,19 @@ def checkProblems(data:QA4):
|
|
| 128 |
return problems
|
| 129 |
|
| 130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
@app.post("/checkdive")
|
| 132 |
def checkProblems(data:QA4):
|
| 133 |
DIVE=GetDeepDive(data.owner,data.msg_type,data.files)
|
| 134 |
return DIVE
|
| 135 |
|
| 136 |
|
|
|
|
|
|
|
|
|
|
| 137 |
@app.post("/checkbreakdown")
|
| 138 |
def checkProblems(data:QA4):
|
| 139 |
DIVE=GetBreakdown(data.owner,data.msg_type,files=data.files)
|
|
@@ -141,6 +158,7 @@ def checkProblems(data:QA4):
|
|
| 141 |
|
| 142 |
|
| 143 |
|
|
|
|
| 144 |
@app.post("/upload-files")
|
| 145 |
async def upload_files(
|
| 146 |
files: List[UploadFile] = File(...),
|
|
@@ -495,9 +513,7 @@ def ResearchB(data:QA2):
|
|
| 495 |
|
| 496 |
return {"problems":None}
|
| 497 |
|
| 498 |
-
'''
|
| 499 |
|
| 500 |
-
'''
|
| 501 |
@app.post("/researchdeepdive")
|
| 502 |
def ResearchDDive(data:QA2):
|
| 503 |
documents=coll.find_one({"owner":data.owner})
|
|
|
|
| 105 |
|
| 106 |
return {"status":False}
|
| 107 |
|
| 108 |
+
|
| 109 |
+
|
| 110 |
@app.post("/checkaccount")
|
| 111 |
def checkaccount(data:Item):
|
| 112 |
status=checkAccount(data.owner)
|
|
|
|
| 115 |
return {'status':True}
|
| 116 |
else:
|
| 117 |
return {"status":False}
|
| 118 |
+
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
|
| 122 |
+
|
| 123 |
|
| 124 |
|
| 125 |
@app.post("/checkfile")
|
|
|
|
| 128 |
return filechecksresponse
|
| 129 |
|
| 130 |
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
|
| 134 |
|
| 135 |
@app.post("/checkproblems")
|
| 136 |
def checkProblems(data:QA4):
|
|
|
|
| 138 |
return problems
|
| 139 |
|
| 140 |
|
| 141 |
+
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
|
| 145 |
@app.post("/checkdive")
|
| 146 |
def checkProblems(data:QA4):
|
| 147 |
DIVE=GetDeepDive(data.owner,data.msg_type,data.files)
|
| 148 |
return DIVE
|
| 149 |
|
| 150 |
|
| 151 |
+
|
| 152 |
+
|
| 153 |
+
|
| 154 |
@app.post("/checkbreakdown")
|
| 155 |
def checkProblems(data:QA4):
|
| 156 |
DIVE=GetBreakdown(data.owner,data.msg_type,files=data.files)
|
|
|
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
+
|
| 162 |
@app.post("/upload-files")
|
| 163 |
async def upload_files(
|
| 164 |
files: List[UploadFile] = File(...),
|
|
|
|
| 513 |
|
| 514 |
return {"problems":None}
|
| 515 |
|
|
|
|
| 516 |
|
|
|
|
| 517 |
@app.post("/researchdeepdive")
|
| 518 |
def ResearchDDive(data:QA2):
|
| 519 |
documents=coll.find_one({"owner":data.owner})
|