美化sss.json,前端作业说明高度调整

This commit is contained in:
zhbaor 2024-10-19 09:16:14 +08:00
parent 3b9d5afd61
commit 9f0a19723a
4 changed files with 5 additions and 6 deletions

View file

@ -294,11 +294,10 @@ def upload_sss_copilot():
else:
return {"exists": False}
else:
print(request.files)
data = request.files["copilot"]
data.save(copilot)
data.seek(0)
data = json.load(data)
with copilot.open("w", encoding="utf-8") as f:
json.dump(data, f, ensure_ascii=False, indent=2)
return {
"exists": True,
"title": data["doc"]["title"],