Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3523128
D9972.id33597.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
872 B
Referenced Files
None
Subscribers
None
D9972.id33597.diff
View Options
diff --git a/keyserver/src/deleters/link-deleters.js b/keyserver/src/deleters/link-deleters.js
--- a/keyserver/src/deleters/link-deleters.js
+++ b/keyserver/src/deleters/link-deleters.js
@@ -6,6 +6,7 @@
import { dbQuery, SQL } from '../database/database.js';
import { checkThreadPermission } from '../fetchers/thread-permission-fetchers.js';
+import { deleteBlob } from '../services/blob.js';
import { Viewer } from '../session/viewer.js';
async function deleteInviteLink(
@@ -24,9 +25,13 @@
const query = SQL`
DELETE FROM invite_links
WHERE name = ${request.name} AND community = ${request.communityID}
+ RETURNING blob_holder AS blobHolder
`;
- await dbQuery(query);
+ const [[row]] = await dbQuery(query);
+ if (row?.blobHolder) {
+ await deleteBlob(`invite_${request.name}`, row.blobHolder);
+ }
}
export { deleteInviteLink };
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 8:23 AM (14 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2699225
Default Alt Text
D9972.id33597.diff (872 B)
Attached To
Mode
D9972: [keyserver] Delete a holder after deleting a blob
Attached
Detach File
Event Timeline
Log In to Comment