aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-09-24 17:53:16 +0000
committerAdam Soltys <[email protected]>2025-09-24 17:53:16 +0000
commit0af958ade70cbf1806489730717739c181b53fdf (patch)
treeab013254b2fc01fea1fb335b6e7ff85b8f6371aa /routes
parentd4ce66326409eff67362bb3592ddc48859627ade (diff)
downloadcoinos-server-0af958ade70cbf1806489730717739c181b53fdf.tar.gz
coinos-server-0af958ade70cbf1806489730717739c181b53fdf.zip
disable delete endpoint
Diffstat (limited to 'routes')
-rw-r--r--routes/users.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/routes/users.ts b/routes/users.ts
index 2304b17e..94deeed7 100644
--- a/routes/users.ts
+++ b/routes/users.ts
@@ -559,6 +559,7 @@ export default {
params: { username },
headers: { authorization },
} = req;
+ fail("Unauthorized");
username = username.toLowerCase();
if (!authorization?.includes(config.admin))
return res.code(401).send("unauthorized");
@@ -694,7 +695,7 @@ export default {
await s(`user:${id}`, user);
await s(`email:${email.toLowerCase()}`, id);
- res.send(pick(user, whitelist));
+ res.send(pick(user, fields));
} catch (e) {
bail(res, e.message);
}