|
|
@@ -19,7 +19,7 @@ from typing import Optional, List
|
|
|
from pathlib import Path
|
|
|
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
|
|
|
|
|
|
-from fastapi import FastAPI, HTTPException, Query, Header
|
|
|
+from fastapi import FastAPI, HTTPException, Query, Header, Body
|
|
|
from fastapi.responses import HTMLResponse
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
@@ -1001,7 +1001,7 @@ def delete_knowledge(knowledge_id: str):
|
|
|
|
|
|
|
|
|
@app.post("/api/knowledge/batch_delete")
|
|
|
-def batch_delete_knowledge(knowledge_ids: List[str]):
|
|
|
+def batch_delete_knowledge(knowledge_ids: List[str] = Body(...)):
|
|
|
"""批量删除知识"""
|
|
|
try:
|
|
|
if not knowledge_ids:
|