aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-09-03 23:24:59 -0700
committerAdam Soltys <[email protected]>2024-09-03 23:24:59 -0700
commitdfde1c88ebb52e50f983f5a36e8868dd0938c3fc (patch)
treefd55db5c6761be6d7b1641af776b34e4c87170de /routes
parent53b4db29cda68a83e9911f163454e158cbbb817f (diff)
downloadcoinos-server-dfde1c88ebb52e50f983f5a36e8868dd0938c3fc.tar.gz
coinos-server-dfde1c88ebb52e50f983f5a36e8868dd0938c3fc.zip
increase bcrypt rounds
Diffstat (limited to 'routes')
-rw-r--r--routes/users.ts18
1 files changed, 4 insertions, 14 deletions
diff --git a/routes/users.ts b/routes/users.ts
index 4fe04bda..e6044a47 100644
--- a/routes/users.ts
+++ b/routes/users.ts
@@ -16,6 +16,7 @@ import upload from "$lib/upload";
const { encode, decode, fromWords, toWords } = bech32;
+console.log("HI");
export default {
upload,
@@ -189,18 +190,7 @@ export default {
try {
l("updating user", user.username);
- let {
- profile,
- banner,
- confirm,
- password,
- pin,
- newpin,
- pubkey,
- username,
- shopifyToken,
- shopifyStore,
- } = body;
+ let { confirm, password, pin, newpin, pubkey, username } = body;
if (user.pin && !(pin === user.pin)) fail("Pin required");
if (typeof newpin !== "undefined" && newpin.length === 6)
@@ -267,7 +257,7 @@ export default {
if (password && password === confirm) {
user.password = await Bun.password.hash(password, {
algorithm: "bcrypt",
- cost: 1,
+ cost: 4,
});
}
@@ -461,7 +451,7 @@ export default {
user.salt = null;
user.password = await Bun.password.hash(password, {
algorithm: "bcrypt",
- cost: 1,
+ cost: 4,
});
await s(`user:${id}`, user);