aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-01-21 19:25:59 +0000
committerAdam Soltys <[email protected]>2026-01-21 19:25:59 +0000
commit54c91d57a37ae0a89e8d9eba1f73467f9bd965f3 (patch)
tree921e53d8983d4c280e47907cc60921b1142fa429
parent08d292474e8310a73fb28d35c500bd8063b73ca3 (diff)
downloadcoinos-server-54c91d57a37ae0a89e8d9eba1f73467f9bd965f3.tar.gz
coinos-server-54c91d57a37ae0a89e8d9eba1f73467f9bd965f3.zip
logging
-rw-r--r--lib/app.ts2
-rw-r--r--lib/nwc.ts16
-rw-r--r--routes/users.ts4
3 files changed, 11 insertions, 11 deletions
diff --git a/lib/app.ts b/lib/app.ts
index 95eb1ae5..23336417 100644
--- a/lib/app.ts
+++ b/lib/app.ts
@@ -30,7 +30,6 @@ const resLogger = pino(pino.destination("res"));
app.addHook("preHandler", async (req) => {
const url = req.raw.url;
const ignore = [
- "/login",
"/ws",
"/me",
"/confirm",
@@ -42,7 +41,6 @@ app.addHook("preHandler", async (req) => {
"/subscriptions",
"/accounts",
"/contacts",
- "/users",
];
if (ignore.some((path) => url.startsWith(path))) return;
diff --git a/lib/nwc.ts b/lib/nwc.ts
index 50b7e411..57e48f95 100644
--- a/lib/nwc.ts
+++ b/lib/nwc.ts
@@ -176,14 +176,14 @@ const handle = (method, params, ev, app, user) =>
}
if (max_amount > 0 && spent + amount > max_amount) {
- warn(
- "budget exceeded",
- pubkey,
- user?.username,
- spent,
- amount,
- max_amount,
- );
+ // warn(
+ // "budget exceeded",
+ // pubkey,
+ // user?.username,
+ // spent,
+ // amount,
+ // max_amount,
+ // );
return error({
code: "QUOTA_EXCEEDED",
message: `Budget exceeded: ${spent + amount} of ${max_amount}`,
diff --git a/routes/users.ts b/routes/users.ts
index bd2ffb42..3b56c9c6 100644
--- a/routes/users.ts
+++ b/routes/users.ts
@@ -371,6 +371,7 @@ export default {
user = pick(user, whitelist);
res.send({ user, token });
} catch (e) {
+ console.log(e);
err("login error", e.message, req.socket.remoteAddress);
res.code(401).send({});
}
@@ -437,7 +438,8 @@ export default {
user = pick(user, whitelist);
res.send({ user, token });
} catch (e) {
- err("login error", e.message, req.socket.remoteAddress);
+ console.log(e);
+ err("nostr login error", e.message, req.socket.remoteAddress);
res.code(401).send({});
}
},