fix for cron endpoint

This commit is contained in:
austinkelsay 2024-10-28 16:18:49 -05:00
parent 10285a82e6
commit 40da1864ea
No known key found for this signature in database
GPG Key ID: 44CB4EC6D9F2FA02
2 changed files with 5 additions and 1 deletions

View File

@ -198,7 +198,10 @@ export const findExpiredSubscriptions = async () => {
},
select: {
userId: true,
nwc: true
nwc: true,
subscriptionExpiredAt: true,
subscriptionStartDate: true,
admin: true,
}
});

View File

@ -13,6 +13,7 @@ export default async function handler(req, res) {
if (req.method === 'GET') {
try {
const expiredSubscriptions = await findExpiredSubscriptions();
console.log("expiredSubscriptions", expiredSubscriptions);
const stillExpired = [];
for (const { userId, nwc } of expiredSubscriptions) {