0.12.0-2 Checkable Infrastructure
This commit is contained in:
@@ -742,16 +742,23 @@ export const api = {
|
||||
},
|
||||
async deleteJobEntry(jobId, target = 'none', options = {}) {
|
||||
const includeRelated = Boolean(options?.includeRelated);
|
||||
const resetDriveState = Boolean(options?.resetDriveState);
|
||||
const selectedMoviePaths = Array.isArray(options?.selectedMoviePaths)
|
||||
? options.selectedMoviePaths
|
||||
.map((item) => String(item || '').trim())
|
||||
.filter(Boolean)
|
||||
: null;
|
||||
const hasKeepDetectedDevice = options?.keepDetectedDevice !== undefined;
|
||||
const keepDetectedDevice = hasKeepDetectedDevice
|
||||
? Boolean(options.keepDetectedDevice)
|
||||
: null;
|
||||
const result = await request(`/history/${jobId}/delete`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
target,
|
||||
includeRelated,
|
||||
resetDriveState,
|
||||
...(hasKeepDetectedDevice ? { keepDetectedDevice } : {}),
|
||||
...(selectedMoviePaths ? { selectedMoviePaths } : {})
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user