diff options
| author | Adam Soltys <[email protected]> | 2022-12-28 15:05:56 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-12-28 15:05:56 -0800 |
| commit | 33d8a7d5235281d705bc1ac27113e150b2b9c617 (patch) | |
| tree | 2d37343db785e4d1cfc54fed193c8db545359797 /lib/utils.js | |
| parent | 581a905b2fc14240d0bcbe6e2c14023fae3589a4 (diff) | |
| download | coinos-server-33d8a7d5235281d705bc1ac27113e150b2b9c617.tar.gz coinos-server-33d8a7d5235281d705bc1ac27113e150b2b9c617.zip | |
fix follows and followers endpoints
Diffstat (limited to 'lib/utils.js')
| -rw-r--r-- | lib/utils.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/utils.js b/lib/utils.js index 17283836..5355cc2c 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -10,6 +10,7 @@ import lnd from "$lib/lnd"; import ln from "$lib/ln"; import { coinos } from "$lib/nostr"; + const { Op } = sequelize; export const sleep = n => new Promise(r => setTimeout(r, n)); @@ -204,3 +205,5 @@ export const derivePayRequest = async ({ amount, memo, tip }) => { await ln.invoice(value ? `${value}sat` : "any", new Date(), memo, 360) ).bolt11; }; + +export const uniq = (a, k) => [...new Map(a.map(x => [k(x), x])).values()]; |
