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", "name": "cloudsearch-backend",
"version": "0.2.2", "version": "0.2.6",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "tsx watch src/main.ts", "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; if (!fids.length) return true;
try { try {
const response = await fetch( const response = await fetch(
`${BASE_URL}/1/clouddrive/file/trash?${makeQuery()}`, `${BASE_URL}/1/clouddrive/file/delete?${makeQuery()}`,
{ {
method: 'POST', method: 'POST',
headers: { ...getHeaders(cookie), 'Content-Type': 'application/json' }, headers: { ...getHeaders(cookie), 'Content-Type': 'application/json' },
body: JSON.stringify({ body: JSON.stringify({
action_type: 1, // 1 = move to trash action_type: 1, // 1 = move to trash
filelist: fids, filelist: fids.map(fid => ({ fid })),
exclude_filelist: [], exclude_filelist: [],
}), }),
signal: AbortSignal.timeout(30000), signal: AbortSignal.timeout(30000),

View File

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

View File

@@ -1,6 +1,6 @@
{ {
"name": "cloudsearch-frontend", "name": "cloudsearch-frontend",
"version": "0.2.2", "version": "0.2.6",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {