v0.2.6: fix trash API (file/trash → file/delete + filelist format) + add ad cleanup integration
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
@@ -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),
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export const VERSION = "0.2.2";
|
export const VERSION = "0.2.6";
|
||||||
|
|||||||
@@ -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": {
|
||||||
|
|||||||
Reference in New Issue
Block a user