Spaces:
Runtime error
Runtime error
CaesarCloudSync commited on
Commit ·
c1838d4
1
Parent(s): 4e1ba5a
Save button and laptop restyling
Browse files
main.py
CHANGED
|
@@ -60,7 +60,20 @@ async def hashnotecard(data : JSONStructure = None):
|
|
| 60 |
return {"message":hashvalue}
|
| 61 |
except Exception as ex:
|
| 62 |
return {"error":f"{type(ex)},{ex}"}
|
| 63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
@app.get("/notecard", response_class=HTMLResponse)
|
| 65 |
async def notecard(request: Request, h:str,u:str):
|
| 66 |
# TODO Add share=1|0 paraneter for security implementations later
|
|
|
|
| 60 |
return {"message":hashvalue}
|
| 61 |
except Exception as ex:
|
| 62 |
return {"error":f"{type(ex)},{ex}"}
|
| 63 |
+
@app.get("/getcard")
|
| 64 |
+
async def notecard(request: Request, h:str,u:str):
|
| 65 |
+
hashedvalue = h
|
| 66 |
+
username = u
|
| 67 |
+
#name = "test1.jpg"
|
| 68 |
+
found_revision_card = find_revision_card(username,hashedvalue)
|
| 69 |
+
try:
|
| 70 |
+
revisioncarddetected = found_revision_card[0]
|
| 71 |
+
#print(revisioncarddetected)
|
| 72 |
+
#<!-- {{ url_for('static', path=name) }}-->
|
| 73 |
+
return revisioncarddetected
|
| 74 |
+
except IndexError as iex:
|
| 75 |
+
print({"message":"revision card was not found."})
|
| 76 |
+
|
| 77 |
@app.get("/notecard", response_class=HTMLResponse)
|
| 78 |
async def notecard(request: Request, h:str,u:str):
|
| 79 |
# TODO Add share=1|0 paraneter for security implementations later
|