Skip to content
Snippets Groups Projects
Commit 45625b63 authored by Sebastian's avatar Sebastian
Browse files

fix bugs

parent 356b3746
No related branches found
No related tags found
1 merge request!6Agree/Decline to work on a manuscript
...@@ -62,6 +62,10 @@ module.exports = models => async (req, res) => { ...@@ -62,6 +62,10 @@ module.exports = models => async (req, res) => {
let resend = false let resend = false
if (invitation !== undefined) { if (invitation !== undefined) {
if (invitation.hasAnswer)
return res
.status(400)
.json({ error: `${invitation.id} has already been answered` })
invitation.timestamp = Date.now() invitation.timestamp = Date.now()
await collection.save() await collection.save()
resend = true resend = true
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment