Make Nostr chat private
This commit is contained in:
@@ -6,6 +6,7 @@ import { issueSession } from "./jwt.js";
|
||||
import { requireAuth } from "./middleware.js";
|
||||
import { unauthorized, forbidden } from "../errors.js";
|
||||
import { logger } from "../logger.js";
|
||||
import { config } from "../config.js";
|
||||
|
||||
export const authRouter = Router();
|
||||
|
||||
@@ -48,3 +49,7 @@ authRouter.post("/login", loginLimiter, (req, res, next) => {
|
||||
authRouter.get("/me", requireAuth, (req, res) => {
|
||||
res.json({ npub: req.session!.npub });
|
||||
});
|
||||
|
||||
authRouter.get("/chat-config", requireAuth, (_req, res) => {
|
||||
res.json({ pubkeys: config.nostr.allowedHexPubkeys });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user