|
@@ -5,6 +5,7 @@ from fastapi import FastAPI,Form, Request
|
|
|
import json
|
|
|
import uvicorn
|
|
|
import zipfile
|
|
|
+import json
|
|
|
|
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
|
app = FastAPI()
|
|
@@ -19,7 +20,7 @@ app.add_middleware(
|
|
|
def read_root(request: Request):
|
|
|
r = redis.Redis(host='db.ptt.cx', port=6379, db=2,password='choozmo9')
|
|
|
data=r.get('btn_data')
|
|
|
- return {'data':data}
|
|
|
+ return json.loads(data)
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|