public async Task <IActionResult> SetUserProfile([FromBody] SetUserProfileRequest request) { return(await Action <SetUserProfileCommand, SetUserProfileCommandParameter, UserProfileResponse>(new SetUserProfileCommandParameter { Data = request })); }
public IActionResult GetSample() { var result = new SetUserProfileRequest { Age = 30, Height = 165, Weight = 165 }; return(Json(result)); }
public JsonResponse <bool> Put([FromBody] SetUserProfileRequest request) { try { _userService.UpdateUserProfile(request); return(new JsonResponse <bool>()); } catch (Exception error) { return(new JsonResponse <bool>(error)); } }
public async Task <Response> UpdateUser(string email, string firstName, string lastName, string phoneNumber) { SetUserProfileRequest user = new SetUserProfileRequest { Email = email, FirstName = firstName, LastName = lastName, PhoneNumber = phoneNumber }; string content = JsonConvert.SerializeObject(user); return(await _apiService.Put <Response>(Urls.SET_USER_PROFILE, content)); }
public async Task <IActionResult> SetProfile([FromBody] SetUserProfileRequest request) { var userProfile = await _userProfileStore.GetProfile(_userContext.SignedInUser.Id) ?? new UserProfile { Id = Guid.NewGuid(), UserId = _userContext.SignedInUser.Id }; userProfile.Age = request.Age; userProfile.Height = request.Height; userProfile.Weight = request.Weight; await _userProfileStore.SetProfile(userProfile); return(Ok()); }
public async Task <Response <UserProfileResponse> > SetProfile(SetUserProfileRequest profile) { return(await _apiService.Patch <Response <UserProfileResponse> >(Urls.SET_USER_PROFILE, profile)); }
public async Task <Response <UserProfileResponse> > SetUserProfile(SetUserProfileRequest updateProfileRequest, string access_token) { string json = JsonConvert.SerializeObject(updateProfileRequest); return(await _apiService.Patch <Response <UserProfileResponse> >(Urls.SET_USER_PROFILE, json, access_token)); }
public void AddUserProfile(SetUserProfileRequest user) { throw new NotImplementedException(); }