next.js prisma monthly package
Unanswered
Sora posted this in #help-forum
SoraOP
A user buys a monthly package and I keep it with the user's tierTimeRemaining, how can I write a code that will automatically reduce it to free plan after 1 month
4 Replies
SoraOP
https://hastebin.skyra.pw/popafosoyu.ts
I've thought about doing something here to check constantly, but wouldn't that slow down the system?
I've thought about doing something here to check constantly, but wouldn't that slow down the system?
How are you hosting your app, if on vercel you can make a cron script to check all users with expiry and then demote... If localhost then could make simple node app with similar cron too
@riský How are you hosting your app, if on vercel you can make a cron script to check all users with expiry and then demote... If localhost then could make simple node app with similar cron too
SoraOP
never mind that vercel has a sample repo for cron, I'll check it out but I have another problem
now I have a url, the value returned from it is text. and if there is type 1 in the url, it automatically downloads the file, but I can't offer this url directly to the user because the url contains the api key and I don't want to give it to the user, how can I do this? @riský