We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77d2772 commit 60697e2Copy full SHA for 60697e2
graphql/resolvers.js
@@ -117,6 +117,7 @@ const resolvers = {
117
const beacon = await Beacon.findOne({ shortcode });
118
119
if (!beacon) return new UserInputError("No beacon exists with that shortcode.");
120
+ if (beacon.expiresAt < Date.now()) return new Error("Beacon has expired");
121
if (beacon.followers.includes(user)) return new Error("Already following the beacon");
122
123
beacon.followers.push(user);
0 commit comments