Sfoglia il codice sorgente

调整一网共享平台返回json格式

baoyubo 10 mesi fa
parent
commit
e0624add0e
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      routers/api/OneShareProxyHandler/__init__.py

+ 1 - 1
routers/api/OneShareProxyHandler/__init__.py

@@ -172,7 +172,7 @@ async def mine(request: Request,db: Session = Depends(get_db)):
     content_type = response.headers.get('Content-Type', '')
 
     if 'application/json' in content_type:
-        return JSONResponse(content=response.text, media_type='application/json',status_code=response.status_code)
+        return JSONResponse(content=response.json(), media_type='application/json',status_code=response.status_code)
     elif 'application/xml' in content_type or 'text/xml' in content_type:
         return Response(content=response.text, media_type='application/xml',status_code=response.status_code)
     elif 'text/html' in content_type: