Apply the UserStore to the userMiddleware

This commit is contained in:
Alex Gleason 2025-02-20 20:04:57 -06:00
parent 8f49b99935
commit f83925331a
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
3 changed files with 11 additions and 3 deletions

View file

@ -6,6 +6,7 @@ import { aesDecrypt } from '../auth/aes.ts';
import { getTokenHash } from '../auth/token.ts'; import { getTokenHash } from '../auth/token.ts';
import { ConnectSigner } from '../signers/ConnectSigner.ts'; import { ConnectSigner } from '../signers/ConnectSigner.ts';
import { ReadOnlySigner } from '../signers/ReadOnlySigner.ts'; import { ReadOnlySigner } from '../signers/ReadOnlySigner.ts';
import { UserStore } from '../storages/UserStore.ts';
import type { DittoConf } from '@ditto/conf'; import type { DittoConf } from '@ditto/conf';
import type { DittoDB } from '@ditto/db'; import type { DittoDB } from '@ditto/db';

View file

@ -1,7 +1,7 @@
import { MockRelay } from '@nostrify/nostrify/test'; import { MockRelay } from '@nostrify/nostrify/test';
import { assertEquals } from '@std/assert'; import { assertEquals } from '@std/assert';
import { UserStore } from '@/storages/UserStore.ts';
import { UserStore } from './UserStore.ts';
import userBlack from '~/fixtures/events/kind-0-black.json' with { type: 'json' }; import userBlack from '~/fixtures/events/kind-0-black.json' with { type: 'json' };
import userMe from '~/fixtures/events/event-0-makes-repost-with-quote-repost.json' with { type: 'json' }; import userMe from '~/fixtures/events/event-0-makes-repost-with-quote-repost.json' with { type: 'json' };

View file

@ -1,4 +1,11 @@
import { NostrEvent, NostrFilter, NostrRelayCLOSED, NostrRelayEOSE, NostrRelayEVENT, NRelay } from '@nostrify/nostrify'; import type {
NostrEvent,
NostrFilter,
NostrRelayCLOSED,
NostrRelayEOSE,
NostrRelayEVENT,
NRelay,
} from '@nostrify/nostrify';
interface UserStoreOpts { interface UserStoreOpts {
relay: NRelay; relay: NRelay;