mirror of
https://github.com/MvDevsUnion/WPetition.git
synced 2026-07-16 20:40:12 +00:00
i dont wanna talk about it
fixed bug where each nid can only sign one Petition
This commit is contained in:
@@ -67,7 +67,7 @@ namespace Submission.Api.Controllers
|
|||||||
|
|
||||||
//check to see if the same person signed the petition already
|
//check to see if the same person signed the petition already
|
||||||
//if dupe send error saying user already signed
|
//if dupe send error saying user already signed
|
||||||
var dupe = await _signatureRepository.FindOneAsync(x => x.IdCard == body.IdCard);
|
var dupe = await _signatureRepository.FindOneAsync(x => x.IdCard == body.IdCard && x.PetitionId == petition_id);
|
||||||
if (dupe != null)
|
if (dupe != null)
|
||||||
return Problem("You already signed this petition");
|
return Problem("You already signed this petition");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user