From 33d8a7d5235281d705bc1ac27113e150b2b9c617 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 28 Dec 2022 15:05:56 -0800 Subject: fix follows and followers endpoints --- lib/utils.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/utils.js') 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()]; -- cgit v1.2.3