diff options
| author | Adam Soltys <[email protected]> | 2023-02-01 19:58:13 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-02-01 19:59:56 +0000 |
| commit | fe0455ffe2d93eda5792ec1ef38348ef24aba2aa (patch) | |
| tree | bf7a50f92102efe926d435268a7963e2a9289e28 /routes | |
| parent | 79caa557bc47d2b727d06c7eaaf3694ccf7202c1 (diff) | |
| download | coinos-server-fe0455ffe2d93eda5792ec1ef38348ef24aba2aa.tar.gz coinos-server-fe0455ffe2d93eda5792ec1ef38348ef24aba2aa.zip | |
preserve user id
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/invoices.js | 1 | ||||
| -rw-r--r-- | routes/users.js | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/routes/invoices.js b/routes/invoices.js index 2ca3b006..d856ef6b 100644 --- a/routes/invoices.js +++ b/routes/invoices.js @@ -13,6 +13,7 @@ export default { invoice = await got(`${config.classic}/invoice/${hash}`).json(); invoice.id = invoice.uuid; invoice.classic = true; + invoice.user.id = invoice.user.uuid; invoice.user.username += "@classic"; } diff --git a/routes/users.js b/routes/users.js index 0692ed23..e3264937 100644 --- a/routes/users.js +++ b/routes/users.js @@ -235,7 +235,7 @@ export default { headers: { authorization: `Bearer ${config.admin}` } }).json(); - u = { id: v4(), about: u.address, ...pick(u, fields) }; + u = { id: u.uuid, about: u.address, ...pick(u, fields) }; delete u.address; await s(`user:${p.with.username}`, u.id); |
