Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BlowaterNostr committed Apr 30, 2024
1 parent 1ea1ee8 commit a7ca731
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions resolvers/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,13 @@ export class EventStore implements EventReadWriter {
kinds: NostrKind[];
authors: string[];
}) {
const keys: Deno.KvKey[] = [];
for (const kind of args.kinds) {
for (const author of args.authors) {
keys.push(["event", kind, author]);
}
}
const results = await this.kv.getMany<NostrEvent[]>(keys);
for (const result of results) {
if (result.value) {
yield result.value;
const key = ["event", kind, author];
const entry = await this.kv.get<NostrEvent>(key);
if (entry.value) {
yield entry.value;
}
}
}
}
Expand Down

0 comments on commit a7ca731

Please sign in to comment.