Feature(custom): trim trailing slash from URL in delete API requests

This commit is contained in:
Kuingsmile
2026-01-13 21:36:20 +08:00
parent 2847384de4
commit 76e7d87944
2 changed files with 2 additions and 2 deletions

View File

@@ -23,7 +23,7 @@ export default class AlistApi {
} }
const result = await axios.request({ const result = await axios.request({
method: 'post', method: 'post',
url: `${url}/api/fs/remove`, url: `${url.replace(/\/$/, '')}/api/fs/remove`,
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
Authorization: token, Authorization: token,

View File

@@ -40,7 +40,7 @@ export default class AListplistApi {
} }
const result = await axios.request({ const result = await axios.request({
method: 'post', method: 'post',
url: `${url}/api/fs/remove`, url: `${url.replace(/\/$/, '')}/api/fs/remove`,
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
Authorization: token, Authorization: token,