File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ class KnowledgeBaseService {
160160 // 使用REST风格的DELETE请求删除索引
161161 const response = await fetch ( API_ENDPOINTS . knowledgeBase . indexDetail ( id ) , {
162162 method : "DELETE" ,
163+ headers : getAuthHeaders ( ) ,
163164 } ) ;
164165
165166 const result = await response . json ( ) ;
@@ -261,6 +262,7 @@ class KnowledgeBaseService {
261262 // 发送请求
262263 const response = await fetch ( API_ENDPOINTS . knowledgeBase . upload , {
263264 method : "POST" ,
265+ headers : getAuthHeaders ( ) ,
264266 body : formData ,
265267 } ) ;
266268
@@ -307,7 +309,8 @@ class KnowledgeBaseService {
307309 const response = await fetch (
308310 `${ API_ENDPOINTS . knowledgeBase . indexDetail ( kbId ) } /documents?path_or_url=${ encodeURIComponent ( docId ) } ` ,
309311 {
310- method : "DELETE"
312+ method : "DELETE" ,
313+ headers : getAuthHeaders ( ) ,
311314 }
312315 ) ;
313316
You can’t perform that action at this time.
0 commit comments