mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-25 11:04:07 +00:00
Ask to delete local files as well.
This commit is contained in:
parent
d926d90dd9
commit
bc08cb1270
4 changed files with 93 additions and 15 deletions
|
|
@ -1337,9 +1337,15 @@ export default class API {
|
|||
}
|
||||
}
|
||||
|
||||
static async deleteLogo(id) {
|
||||
static async deleteLogo(id, deleteFile = false) {
|
||||
try {
|
||||
await request(`${host}/api/channels/logos/${id}/`, {
|
||||
const params = new URLSearchParams();
|
||||
if (deleteFile) {
|
||||
params.append('delete_file', 'true');
|
||||
}
|
||||
|
||||
const url = `${host}/api/channels/logos/${id}/?${params.toString()}`;
|
||||
await request(url, {
|
||||
method: 'DELETE',
|
||||
});
|
||||
|
||||
|
|
@ -1351,11 +1357,16 @@ export default class API {
|
|||
}
|
||||
}
|
||||
|
||||
static async deleteLogos(ids) {
|
||||
static async deleteLogos(ids, deleteFiles = false) {
|
||||
try {
|
||||
const body = { logo_ids: ids };
|
||||
if (deleteFiles) {
|
||||
body.delete_files = true;
|
||||
}
|
||||
|
||||
await request(`${host}/api/channels/logos/bulk-delete/`, {
|
||||
method: 'DELETE',
|
||||
body: { logo_ids: ids },
|
||||
body: body,
|
||||
});
|
||||
|
||||
// Remove multiple logos from store
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue