mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-06 07:04:24 +01:00
Remove unused handler.ts file
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
import { gossipDB } from '@/db.ts';
|
||||
import { type Event } from '@/event.ts';
|
||||
|
||||
import { getAuthorRelays } from './gossip.ts';
|
||||
|
||||
function handleEvent(event: Event): void {
|
||||
handleRelays(event);
|
||||
}
|
||||
|
||||
/** Add author relays into the database. */
|
||||
function handleRelays(event: Event): Promise<boolean[]> {
|
||||
const relays = getAuthorRelays(event);
|
||||
return Promise.all(
|
||||
relays.map((relay) => gossipDB.put(event.pubkey, relay.toString())),
|
||||
);
|
||||
}
|
||||
|
||||
export { handleEvent };
|
||||
Reference in New Issue
Block a user