mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-06 20:42:57 +08:00
✨ Feature(custom): trim trailing slash from URL in delete API requests
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user