Fix stats:recompute script

This commit is contained in:
Alex Gleason 2025-02-22 21:30:57 -06:00
parent 1ae9da5793
commit 979f2cffb4
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -9,6 +9,8 @@ const conf = new DittoConf(Deno.env);
const db = new DittoPolyPg(conf.databaseUrl); const db = new DittoPolyPg(conf.databaseUrl);
const relay = new DittoPgStore({ db, pubkey: await conf.signer.getPublicKey() }); const relay = new DittoPgStore({ db, pubkey: await conf.signer.getPublicKey() });
const { kysely } = db;
let pubkey: string; let pubkey: string;
try { try {
const result = nip19.decode(Deno.args[0]); const result = nip19.decode(Deno.args[0]);
@ -22,4 +24,4 @@ try {
Deno.exit(1); Deno.exit(1);
} }
await refreshAuthorStats({ pubkey, kysely: db.kysely, store: relay }); await refreshAuthorStats({ pubkey, kysely, relay });