aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sync.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sync.js')
-rw-r--r--lib/sync.js20
1 files changed, 2 insertions, 18 deletions
diff --git a/lib/sync.js b/lib/sync.js
index 10e857b3..6c048388 100644
--- a/lib/sync.js
+++ b/lib/sync.js
@@ -11,13 +11,13 @@ const init = async () => {
}
try {
- const twoDays = new Date(new Date().setDate(new Date().getDate() - 2));
+ const thirtyDays = new Date(new Date().setDate(new Date().getDate() - 30));
(
await db.Invoice.findAll({
where: {
createdAt: {
- [Op.gt]: twoDays
+ [Op.gt]: thirtyDays
}
},
include: {
@@ -33,22 +33,6 @@ const init = async () => {
console.log(e);
}
- try {
- const accounts = await db.Account.findAll({
- where: { pubkey: { [Op.ne]: null } },
- include: {
- model: db.User,
- as: "user"
- }
- });
-
- accounts.map(({ address, user: { username } }) => {
- addresses[address] = username;
- });
- } catch (e) {
- console.log(e);
- }
-
payments = (
await db.Payment.findAll({
attributes: ["hash"]