public async Task <IActionResult> ChangePassword(ChangePasswordDto dto)
        {
            var result = await _korisnikService.ChangePassword(dto.CurrentPassword, dto.NewPassword);

            if (!result.Succeeded)
            {
                return(WithStatusCode(result.StatusCode, result.Message));
            }

            return(Ok());
        }
        public async Task <ActionResult <dynamic> > ChangePassword([FromBody] ChangePasswordRequest request)
        {
            var ID = HttpContext.GetUserID();

            if (ID == null)
            {
                return(BadRequest());
            }

            var response = await _service.ChangePassword((int)ID, request);

            if (!response.Succeeded)
            {
                return(BadRequest(response.Errors));
            }

            return(Ok(response.Succeeded));
        }