From 91e847126c832efa25ab0bf8d6f3b7e537378fa7 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 16 Jan 2023 23:40:25 -0800 Subject: shuffle things around --- routes/lightning/query.js | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 routes/lightning/query.js (limited to 'routes/lightning/query.js') diff --git a/routes/lightning/query.js b/routes/lightning/query.js deleted file mode 100644 index c5456a6f..00000000 --- a/routes/lightning/query.js +++ /dev/null @@ -1,19 +0,0 @@ -import { emit } from "$lib/sockets"; - -export default async (req, res) => { - const { payreq } = req.body; - - const invoice = await db.Invoice.findOne({ - include: { - attributes: ["username"], - model: db.User, - as: "user" - }, - where: { - text: payreq - } - }); - - if (invoice) emit(req.user.username, "to", invoice.user); - res.send({}); -}; -- cgit v1.2.3