public async Task<IActionResult> Update(Guid userID, Guid likeID, UpdateLikeDto updateLikeInfo) { var like = new Like { ID = likeID, SenderID = userID }; #region [Authorization] var result = await this.AuthorizationService.AuthorizeAsync ( this.User, like, nameof(KindlyPolicies.AllowIfOwner) ); if (result.Succeeded == false) { return this.Unauthorized(); } #endregion this.Mapper.Map(updateLikeInfo, like); await this.Repository.Update(like); return this.Ok(); }
public void Pulse_UnLikeUpdate_Pass() { try { var updateLikeDto = new UpdateLikeDto { UserId = 5412166 }; _mondayClient.CreateUnLikeOnPulseUpdate(229899909, updateLikeDto).Wait(); } catch (Exception ex) { Assert.Fail(ex.ToString()); } }
/// <summary> ///UnLike an update. /// </summary> /// <param name="updateId">The updates’s unique identifier.</param> /// <param name="updateLikeDto">The dto for user’s unique identifier.</param> /// <returns></returns> public async Task CreateUnLikeOnPulseUpdate(int updateId, UpdateLikeDto updateLikeDto) { await _mondayClient.PostUnLikeUpdateByUpdateIdAsync(updateId, updateLikeDto); }