Hello,
I'm using next.js and mongoose, and what I want to do is the following:
- Send a POST request and get back an object id
- create a QR code of the id
- when the QR code is scanned I get the object
- object is deleted after 2 hours of being created
How do I automatically delete objects after 2 hours of their created time in mongoose/ mongodb? I found the "expireAt" field but just want to make sure that this is what I should be looking for?
submitted by /u/TheCodingTutor
[link] [comments]
from Software Development – methodologies, techniques, and tools. Covering Agile, RUP, Waterfall + more! https://ift.tt/SnYfQoz