Ejemplo n.º 1
0
 public IActionResult UpdateEmployee(EmployeeProfileDto requestDto)
 {
     try
     {
         _employeeProfileService.UpdateEmployeeProfile(requestDto);
         return(RedirectToAction("Employee"));
     }
     catch (Exception)
     {
         throw;
     }
 }
        // [DUTAuthorize]
        public IHttpActionResult UpdateEmployeeProfile([FromBody] UpdateEmployeeProfile updateEmployeeProfile)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return(BadRequest(ModelState));
                }

                _employeeProfileService.UpdateEmployeeProfile(updateEmployeeProfile, Request.GetAuthorizationHeader());
                return(Ok());
            }
            catch (System.Exception e)
            {
                return(InternalServerError(e));
            }
        }