Skip to content

Commit

Permalink
Resolving changes by gautam sheth.
Browse files Browse the repository at this point in the history
  • Loading branch information
NishkalankBezawada committed Feb 29, 2024
1 parent 72ef3c0 commit e20be98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
16 changes: 2 additions & 14 deletions documentation/Set-PnPPage.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Likes the page

### EXAMPLE 11
```powershell
Set-PnPPage -Identity "MyPage.aspx" -UnLike
Set-PnPPage -Identity "MyPage.aspx" -Like:$false
```
Unlikes the page

Expand Down Expand Up @@ -376,7 +376,7 @@ Accept wildcard characters: False
```
### -Like
Likes the page
Likes the page, if parameter is set to false then it Unlikes the page
```yaml
Type: SwitchParameter
Expand All @@ -389,19 +389,7 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -UnLike
Likes the page
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
## RELATED LINKS
Expand Down
10 changes: 2 additions & 8 deletions src/Commands/Pages/SetPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ public class SetPage : PnPWebCmdlet, IDynamicParameters
[Parameter(Mandatory = false)]
public SwitchParameter Like = false;

[Parameter(Mandatory = false)]
public SwitchParameter UnLike = false;

private CustomHeaderDynamicParameters customHeaderParameters;

Expand Down Expand Up @@ -185,12 +183,8 @@ protected override void ExecuteCmdlet()
if (Like)
{
clientSidePage.Like();
}
}

if (ParameterSpecified(nameof(UnLike)))
{
if (UnLike)
}
else
{
clientSidePage.Unlike();
}
Expand Down

0 comments on commit e20be98

Please sign in to comment.