aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/main.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/main.ts b/server/main.ts
index 9dc6191..3a28ee9 100644
--- a/server/main.ts
+++ b/server/main.ts
@@ -62,6 +62,8 @@ const discdag = express()
});
}))
+ .post('/logout', wrap(async ($req, $res) => $res.cookie('digest', '').json({})))
+
.get('/list', wrap(async ($req, $res) => {
const { digest } = $req.cookies;
@@ -131,6 +133,9 @@ const discdag = express()
const doc = cheerio.load(await res.text());
+ if (doc.text().indexOf("Invalid discussion ID:") > -1)
+ return $res.status(404).end();
+
type Note = {
type: 'Note';
published: string;