diff options
| author | Adam Soltys <[email protected]> | 2023-03-22 16:57:37 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-03-22 16:57:37 -0700 |
| commit | 711b75309ce8c4efce457a1938b50ac875550b2d (patch) | |
| tree | d23e6decc7ed87b774a6ee5145be2b33c06a73a3 /routes/users.js | |
| parent | f4366d86b20a4a5a9bb3c85d9559d0b61beac6c9 (diff) | |
| download | coinos-server-711b75309ce8c4efce457a1938b50ac875550b2d.tar.gz coinos-server-711b75309ce8c4efce457a1938b50ac875550b2d.zip | |
prettier
Diffstat (limited to 'routes/users.js')
| -rw-r--r-- | routes/users.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/routes/users.js b/routes/users.js index 3e5741a2..3c083d17 100644 --- a/routes/users.js +++ b/routes/users.js @@ -83,7 +83,7 @@ export default { username: key, display: key.substr(0, 6), pubkey: key, - anon: true + anon: true, }; } @@ -100,7 +100,7 @@ export default { "pubkey", "display", "prompt", - "id" + "id", ]; if (user.pubkey) @@ -124,7 +124,7 @@ export default { pubkey, password, username, - salt + salt, }; user = await register(user, ip, false); @@ -201,7 +201,7 @@ export default { "salt", "seed", "tokens", - "twofa" + "twofa", ]; for (let a of attributes) { @@ -245,7 +245,7 @@ export default { if (!token) fail(); user = await got(`${classic}/admin/migrate/${username}?zero=true`, { - headers: { authorization: `Bearer ${config.admin}` } + headers: { authorization: `Bearer ${config.admin}` }, }).json(); let { balance } = user; @@ -257,7 +257,7 @@ export default { ...pick(user, fields), id: uid, about: user.address, - migrated: true + migrated: true, }; await s(`user:${username}`, uid); @@ -265,7 +265,7 @@ export default { await s(`balance:${uid}`, balance); let payments = await got(`${classic}/payments`, { - headers: { authorization: `Bearer ${token}` } + headers: { authorization: `Bearer ${token}` }, }).json(); for (let p of payments) { @@ -275,7 +275,7 @@ export default { "confirmed", "rate", "currency", - "preimage" + "preimage", ]); n.id = v4(); n.created = parseISO(p.createdAt).getTime(); @@ -293,7 +293,7 @@ export default { u = await got( `${classic}/admin/migrate/${p.with.username.toLowerCase()}`, { - headers: { authorization: `Bearer ${config.admin}` } + headers: { authorization: `Bearer ${config.admin}` }, } ).json(); @@ -365,7 +365,7 @@ export default { if (!subscriptions) subscriptions = []; if ( !subscriptions.find( - s => JSON.stringify(s) === JSON.stringify(subscription) + (s) => JSON.stringify(s) === JSON.stringify(subscription) ) ) subscriptions.push(subscription); @@ -402,8 +402,8 @@ export default { let contacts = (await g(`${id}:contacts`)) || []; for (let { ref } of ( - await Promise.all(payments.map(async id => await g(`payment:${id}`))) - ).filter(p => p.type === types.internal && p.ref)) { + await Promise.all(payments.map(async (id) => await g(`payment:${id}`))) + ).filter((p) => p.type === types.internal && p.ref)) { !~contacts.findIndex(({ id }) => id === ref) && contacts.push(await g(`user:${ref}`)); } @@ -461,5 +461,5 @@ export default { } catch (e) { bail(res, e.message); } - } + }, }; |
