Skip to content

Commit 093902a

Browse files
committed
refactor(MarkdownEditor): 移除冗余的withToken参数并添加调试日志
移除http.post请求中冗余的withToken参数,因为http库已处理其自身的token逻辑
1 parent d61c66d commit 093902a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

blog-web/src/components/solid/MarkdownEditor.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ export default function MarkdownEditor() {
8181
if (uploadToken()) {
8282
headers['Authorization'] = `Bearer ${uploadToken()}`;
8383
}
84+
console.log(headers)
8485
const response = await http.post('/upload', formData, {
8586
baseURL: 'http://121.62.28.11:40027/api/v1',
86-
withToken: true, // Assuming http lib handles its own token logic if this is true
8787
headers: headers
8888
});
8989

@@ -195,9 +195,9 @@ export default function MarkdownEditor() {
195195
if (uploadToken()) {
196196
headers['Authorization'] = `Bearer ${uploadToken()}`;
197197
}
198+
console.log(headers)
198199
const response = await http.post('/upload', formData, {
199200
baseURL: 'http://121.62.28.11:40027/api/v1',
200-
withToken: true, // Assuming http lib handles its own token logic if this is true
201201
headers: headers
202202
});
203203

0 commit comments

Comments
 (0)