updat
Browse files- api/main.py +3 -6
api/main.py
CHANGED
@@ -2,13 +2,10 @@ from api.core.app import Demos
|
|
2 |
__main = Demos()
|
3 |
api = __main.api()
|
4 |
@api.get("/", status_code=201)
|
5 |
-
def home(
|
6 |
-
__response=dict({"
|
7 |
try:
|
8 |
-
|
9 |
-
__response['texto']=__main.obtener_texto(from_url=data.get('url'))
|
10 |
-
else:
|
11 |
-
raise __main.exception(status_code = 401, datail=f"Datos mal formados:\n{data}")
|
12 |
except Exception as e:
|
13 |
print(e)
|
14 |
#To-do ->agregar mas información en el error fecha, usuario, reqs
|
|
|
2 |
__main = Demos()
|
3 |
api = __main.api()
|
4 |
@api.get("/", status_code=201)
|
5 |
+
def home() -> dict:
|
6 |
+
__response=dict({"no_request_data"})
|
7 |
try:
|
8 |
+
__response['texto']=__main.obtener_texto(from_url=data.get('url'))
|
|
|
|
|
|
|
9 |
except Exception as e:
|
10 |
print(e)
|
11 |
#To-do ->agregar mas información en el error fecha, usuario, reqs
|