コード例 #1
0
        public async Task <ActionResult> DeleteEnrolleeNotification(int enrolleeId, int adjudicatorNoteId)
        {
            if (!await _enrolleeService.EnrolleeExistsAsync(enrolleeId))
            {
                return(NotFound(ApiResponse.Message($"Enrollee not found with id {enrolleeId}")));
            }
            var note = await _enrolleeService.GetEnrolleeAdjudicatorNoteAsync(enrolleeId, adjudicatorNoteId);

            if (note == null || note.EnrolleeNotification == null)
            {
                return(NotFound(ApiResponse.Message($"Enrollee note with notification not found with id {adjudicatorNoteId}")));
            }

            await _enrolleeService.RemoveEnrolleeNotificationAsync(note.EnrolleeNotification.Id);

            return(Ok());
        }