mirror of
https://github.com/MvDevsUnion/WPetition.git
synced 2026-02-02 04:50:57 +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
|
||||
//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)
|
||||
return Problem("You already signed this petition");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user