public void CreateOrUpdate(User user) { if (user._id == "") { BaseApi.Post(playerCollection, new BaseUser(user.Name, user.UserAuthenticationId)).completed += ReadUserCallback; } else { BaseApi.Put(playerCollection, user, user._id); } }
public static async Task UploadUserImageAsync(string imageAsBase64, UserProfile profile) { var uri = $"{GlobalSettings.AuthenticationEndpoint}api/Profiles/image/{profile.UserId}"; var imageModel = new ImageModel { Data = imageAsBase64 }; await BaseApi.Put(uri, imageModel); //await CacheHelper.RemoveFromCache(profile.PhotoUrl); }