public IActionResult UpdateReview(JobReviewViewModel jobReview)
        {
            if (!ModelState.IsValid)
            {
                return(new OkObjectResult(false));
            }

            _jobService.UpdateJobReview(jobReview);
            _jobService.Save();

            return(new OkObjectResult(true));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> SendFeedback(int jobId, JobReviewViewModel jobReviewVm)
        {
            if (!ModelState.IsValid)
            {
                return(new OkObjectResult(false));
            }

            _jobService.SendReview(jobId, jobReviewVm);
            _jobService.Save();

            await _emailSender.SendEmailAsync(CommonConstants.MailAdmin, $"Job-Feedback: {jobReviewVm.Name}", jobReviewVm.Review);

            return(new OkObjectResult(true));
        }