feat: add compatibility mode for deleting ciphers to support Bitwarden clients

This commit is contained in:
shuaiplus
2026-02-23 19:35:06 +08:00
parent 3873d347aa
commit 36715645c6
2 changed files with 25 additions and 1 deletions
+2 -1
View File
@@ -17,6 +17,7 @@ import {
handleCreateCipher,
handleUpdateCipher,
handleDeleteCipher,
handleDeleteCipherCompat,
handlePermanentDeleteCipher,
handleRestoreCipher,
handlePartialUpdateCipher,
@@ -419,7 +420,7 @@ export async function handleRequest(request: Request, env: Env): Promise<Respons
if (subPath === '' || subPath === '/') {
if (method === 'GET') return handleGetCipher(request, env, userId, cipherId);
if (method === 'PUT' || method === 'POST') return handleUpdateCipher(request, env, userId, cipherId);
if (method === 'DELETE') return handleDeleteCipher(request, env, userId, cipherId);
if (method === 'DELETE') return handleDeleteCipherCompat(request, env, userId, cipherId);
}
if (subPath === '/delete' && method === 'PUT') {