v0.2.6: fix trash API (file/trash → file/delete + filelist format) + add ad cleanup integration

This commit is contained in:
2026-05-16 22:39:58 +08:00
parent 3179150596
commit 80e5d24143
4 changed files with 5 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "cloudsearch-backend",
"version": "0.2.2",
"version": "0.2.6",
"private": true,
"scripts": {
"dev": "tsx watch src/main.ts",

View File

@@ -198,13 +198,13 @@ export async function trashFiles(cookie: string, fids: string[]): Promise<boolea
if (!fids.length) return true;
try {
const response = await fetch(
`${BASE_URL}/1/clouddrive/file/trash?${makeQuery()}`,
`${BASE_URL}/1/clouddrive/file/delete?${makeQuery()}`,
{
method: 'POST',
headers: { ...getHeaders(cookie), 'Content-Type': 'application/json' },
body: JSON.stringify({
action_type: 1, // 1 = move to trash
filelist: fids,
filelist: fids.map(fid => ({ fid })),
exclude_filelist: [],
}),
signal: AbortSignal.timeout(30000),

View File

@@ -1 +1 @@
export const VERSION = "0.2.2";
export const VERSION = "0.2.6";