diff --git a/src/app.ts b/src/app.ts index 8c8cbc0..447499f 100644 --- a/src/app.ts +++ b/src/app.ts @@ -96,8 +96,6 @@ interface AppEnv extends HonoEnv { signer?: NostrSigner; /** NIP-98 signed event proving the pubkey is owned by the user. */ proof?: NostrEvent; - /** User associated with the pubkey, if any. */ - user?: User; /** Store */ store: NStore; }; diff --git a/src/middleware/auth98Middleware.ts b/src/middleware/auth98Middleware.ts index 7cd7059..abecea7 100644 --- a/src/middleware/auth98Middleware.ts +++ b/src/middleware/auth98Middleware.ts @@ -34,9 +34,8 @@ type UserRole = 'user' | 'admin'; /** Require the user to prove their role before invoking the controller. */ function requireRole(role: UserRole, opts?: ParseAuthRequestOpts): AppMiddleware { - return withProof(async (c, proof, next) => { + return withProof(async (_c, proof, next) => { const user = await findUser({ pubkey: proof.pubkey }); - c.set('user', user); if (user && matchesRole(user, role)) { await next();