bugfix uploadfile&app update_time
This commit is contained in:
@@ -3,6 +3,7 @@ from io import BytesIO
|
||||
import typing as t
|
||||
import pandas as pd
|
||||
import json
|
||||
import base64
|
||||
import httpx
|
||||
import deepdiff
|
||||
import app.core.config as config
|
||||
@@ -493,6 +494,17 @@ async def test(file:UploadFile= File(...),app:str=None):
|
||||
return test
|
||||
|
||||
|
||||
@r.get("/group")
|
||||
async def group(request:Request,kintoneurl:str,kintoneuser:str,kintonepwd:str):
|
||||
try:
|
||||
auth_value = base64.b64encode(bytes(f"{kintoneuser}:{kintonepwd}","utf-8"))
|
||||
headers={config.API_V1_AUTH_KEY:auth_value}
|
||||
url = f"{kintoneurl}/v1/user/groups.json?code={kintoneuser}"
|
||||
r = httpx.get(url,headers=headers)
|
||||
return r.json()
|
||||
except Exception as e:
|
||||
raise APIException('kintone:app',request.url._url, f"Error occurred while get app({env.DOMAIN_NAME}->{app}):",e)
|
||||
|
||||
@r.post("/download",)
|
||||
async def download(request:Request,key,c:config.KINTONE_ENV=Depends(getkintoneenv)):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user