Beispiel #1
0
        public async Task <IActionResult> AttachUser(Guid reportId, string email)
        {
            if (await _reportService.ContainsUser(reportId, email))
            {
                return(BadRequest($"User with email='{email}' already attached to report with id='{reportId}'"));
            }

            await _reportService.AttachUserAsync(reportId, email);

            return(Ok($"User with email='{email}' was successfully attached to report with id='{reportId}'"));
        }