mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Delete unused getUnattachedMedia function
This commit is contained in:
parent
552de01a17
commit
c8bec9b4b7
1 changed files with 0 additions and 9 deletions
|
|
@ -34,14 +34,6 @@ function selectUnattachedMediaQuery(kysely: Kysely<DittoTables>) {
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Find attachments that exist but aren't attached to any events. */
|
|
||||||
function getUnattachedMedia(kysely: Kysely<DittoTables>, until: Date) {
|
|
||||||
return selectUnattachedMediaQuery(kysely)
|
|
||||||
.leftJoin('nostr_tags', 'unattached_media.url', 'nostr_tags.value')
|
|
||||||
.where('uploaded_at', '<', until.getTime())
|
|
||||||
.execute();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Delete unattached media by URL. */
|
/** Delete unattached media by URL. */
|
||||||
async function deleteUnattachedMediaByUrl(url: string) {
|
async function deleteUnattachedMediaByUrl(url: string) {
|
||||||
const { kysely } = await DittoDB.getInstance();
|
const { kysely } = await DittoDB.getInstance();
|
||||||
|
|
@ -77,7 +69,6 @@ async function deleteAttachedMedia(pubkey: string, urls: string[]): Promise<void
|
||||||
export {
|
export {
|
||||||
deleteAttachedMedia,
|
deleteAttachedMedia,
|
||||||
deleteUnattachedMediaByUrl,
|
deleteUnattachedMediaByUrl,
|
||||||
getUnattachedMedia,
|
|
||||||
getUnattachedMediaByIds,
|
getUnattachedMediaByIds,
|
||||||
insertUnattachedMedia,
|
insertUnattachedMedia,
|
||||||
type UnattachedMedia,
|
type UnattachedMedia,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue