mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-08 16:14:22 +01:00
DittoDB.getInstance() -> Storages.kysely()
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { DittoDB } from '@/db/DittoDB.ts';
|
||||
import { Storages } from '@/storages.ts';
|
||||
|
||||
// This migrates kysely internally.
|
||||
const { kysely } = await DittoDB.getInstance();
|
||||
const kysely = await Storages.kysely();
|
||||
|
||||
// Close the connection before exiting.
|
||||
await kysely.destroy();
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { nip19 } from 'nostr-tools';
|
||||
|
||||
import { DittoDB } from '@/db/DittoDB.ts';
|
||||
import { Storages } from '@/storages.ts';
|
||||
import { refreshAuthorStats } from '@/utils/stats.ts';
|
||||
|
||||
@@ -18,6 +17,6 @@ try {
|
||||
}
|
||||
|
||||
const store = await Storages.db();
|
||||
const { kysely } = await DittoDB.getInstance();
|
||||
const kysely = await Storages.kysely();
|
||||
|
||||
await refreshAuthorStats({ pubkey, kysely, store });
|
||||
|
||||
Reference in New Issue
Block a user