mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-04-19 19:01:19 +00:00
fix for cron endpoint
This commit is contained in:
parent
10285a82e6
commit
40da1864ea
@ -198,7 +198,10 @@ export const findExpiredSubscriptions = async () => {
|
||||
},
|
||||
select: {
|
||||
userId: true,
|
||||
nwc: true
|
||||
nwc: true,
|
||||
subscriptionExpiredAt: true,
|
||||
subscriptionStartDate: true,
|
||||
admin: true,
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user