public ServiceResponse <bool> UpdateSocials(SocialsDTO socialsUpdateDTO, int userId) { var serviceResponse = new ServiceResponse <bool>(); try { var cv = _cvRepository.Get(x => x.UserId == userId); cv.Facebook = socialsUpdateDTO.Facebook; cv.Twitter = socialsUpdateDTO.Twitter; cv.Medium = socialsUpdateDTO.Medium; cv.Instagram = socialsUpdateDTO.Instagram; cv.Linkedin = socialsUpdateDTO.Linkedin; cv.Youtube = socialsUpdateDTO.Youtube; _cvRepository.Update(cv); serviceResponse.Data = true; return(serviceResponse.Success()); } catch (Exception ex) { return(serviceResponse.Error("Sosyal Medya Hesapları Güncellenemedi")); } }
public ServiceResponse <bool> UpdateSocials([FromBody] SocialsDTO socialsUpdateDTO) { var claims = GetUserClaims(); var isValid = ModelState.IsValid; return(_userService.UpdateSocials(socialsUpdateDTO, claims.UserId)); }