Ver Fonte

misa-event

zooey há 2 anos atrás
pai
commit
45b9fe0a31
1 ficheiros alterados com 6 adições e 0 exclusões
  1. 6 0
      main.py

+ 6 - 0
main.py

@@ -68,6 +68,12 @@ def news(request: Request):
     data=r.get('misa-liff')
     data=r.get('misa-liff')
     return json.loads(data)
     return json.loads(data)
 
 
+@app.get("/misa-event")
+def news(request: Request):
+    r = redis.Redis(host='db.ptt.cx', port=6379, db=2,password='choozmo9')
+    data=r.get('misa-liff')
+    return json.loads(data)
+
 
 
 if __name__ == "__main__":
 if __name__ == "__main__":
     uvicorn.run("main:app", host="0.0.0.0", port=9898,ssl_keyfile='/etc/letsencrypt/live/liff.googo.org/privkey.pem',ssl_certfile='/etc/letsencrypt/live/liff.googo.org/cert.pem')
     uvicorn.run("main:app", host="0.0.0.0", port=9898,ssl_keyfile='/etc/letsencrypt/live/liff.googo.org/privkey.pem',ssl_certfile='/etc/letsencrypt/live/liff.googo.org/cert.pem')