Exemple #1
0
        public async Task <IActionResult> TerminateCandidacy(TerminateCandidacyRequest request)
        {
            var selectedCandidacy = await _electionService.TerminateCandidacy(request.CandidateId, request.ElectionId, DateTime.Now);

            var response = new TerminateCandidacyResponse
            {
                CandidacyId = selectedCandidacy.Id,
                DateTime    = DateTime.Now
            };

            return(Ok(response));
        }