mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-06-06 18:31:00 +00:00
fix for cron endpoint
This commit is contained in:
parent
10285a82e6
commit
40da1864ea
@ -198,7 +198,10 @@ export const findExpiredSubscriptions = async () => {
|
|||||||
},
|
},
|
||||||
select: {
|
select: {
|
||||||
userId: true,
|
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') {
|
if (req.method === 'GET') {
|
||||||
try {
|
try {
|
||||||
const expiredSubscriptions = await findExpiredSubscriptions();
|
const expiredSubscriptions = await findExpiredSubscriptions();
|
||||||
|
console.log("expiredSubscriptions", expiredSubscriptions);
|
||||||
const stillExpired = [];
|
const stillExpired = [];
|
||||||
|
|
||||||
for (const { userId, nwc } of expiredSubscriptions) {
|
for (const { userId, nwc } of expiredSubscriptions) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user