i dont wanna talk about it

fixed bug where each nid can only sign one Petition
This commit is contained in:
fISHIE
2026-01-21 16:12:08 +05:00
parent f69fbefcd6
commit f0e95dd962

View File

@@ -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");