Exemple #1
0
 public void updateProfilePicture(updateUserProfilePicture model)
 {
     DataProvider.ExecuteNonQuery(GetConnection, "dbo.UpdateUserProfileMedia"
                                  , inputParamMapper : delegate(SqlParameterCollection paramCollection)
     {
         paramCollection.AddWithValue("@mediaId", model.mediaId);
         paramCollection.AddWithValue("@userId", model.userId);
     }
                                  );
 }
        public HttpResponseMessage updateUserProfile(updateUserProfilePicture model)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }

            model.userId = UserService.GetCurrentUserId();

            // model.UserId = userId;

            _userProfileService.updateProfilePicture(model);

            ItemResponse <bool> response = new ItemResponse <bool>();

            response.IsSuccessful = true;

            return(Request.CreateResponse(HttpStatusCode.OK, response));
        }