예제 #1
0
        public async Task <IActionResult> Update(KadraVykhovnykivDTO kadrasDTO)
        {
            if (User.IsInRole("Admin"))
            {
                await _kvService.UpdateKadra(kadrasDTO);

                return(StatusCode(StatusCodes.Status200OK));
            }
            else
            {
                _logger.LogError("Current user is not an admin");
                return(StatusCode(StatusCodes.Status403Forbidden));
            }
        }
예제 #2
0
        public async Task <IActionResult> Update(KadraVykhovnykivDTO kadrasDTO)
        {
            await _kvService.UpdateKadra(kadrasDTO);

            return(StatusCode(StatusCodes.Status200OK));
        }