bugfix uploadfile&app update_time

This commit is contained in:
2025-03-30 10:58:27 +09:00
parent 3c6e4a6faa
commit 974f90eb2a
4 changed files with 23 additions and 4 deletions

View File

@@ -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: