From 454400d0bc5289b77c965b5c47457d5fa306dba2 Mon Sep 17 00:00:00 2001 From: Siddharth VP Date: Sun, 24 Mar 2024 18:05:56 +0530 Subject: [PATCH] dyk: fix noms lookup for usernames with a space --- webservice/routes/dyk.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webservice/routes/dyk.ts b/webservice/routes/dyk.ts index 8625360..fec67f1 100644 --- a/webservice/routes/dyk.ts +++ b/webservice/routes/dyk.ts @@ -22,7 +22,7 @@ router.get('/credits/:user', async (req, res, next) => { }); router.get('/noms/:user', async (req, res, next) => { - const user = req.params.user.replace(/ /g, '_'); + const user = req.params.user.replace(/_/g, ' '); let count = await redis.hget('dyk-counts', user) as unknown as string; if (!count) {