Esempio n. 1
0
        public async Task <IActionResult> PostHistoryElement([FromBody] HistoryElementCreateDto historyToCreate, [FromRoute] long id)
        {
            await _organizationService.AddHistoryElement(id, _mapper.Map <HistoryElement>(historyToCreate));

            User userOfChange = await userService.FindByNameAsync(User.Identity.Name);

            await modService.UpdateOrganizationByHistoryElementAsync(userOfChange, id, historyToCreate.Name + ":" + historyToCreate.Comment);

            return(Ok());
        }