Skip to content

Commit

Permalink
Add buffer route for next release
Browse files Browse the repository at this point in the history
  • Loading branch information
amos-cha committed Jul 5, 2023
1 parent 6a1cece commit 88c8e06
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Gordon360/Controllers/MembershipsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,25 @@ public async Task<ActionResult<MembershipView>> SetGroupAdminAsync(int membershi
return Ok(result);
}

/// <summary>
/// Update an existing membership item to be private or not
///
/// TO BE DEPRECATED. Next release to use HttpPatch
/// </summary>
/// <param name="membershipID">The membership to set the privacy of</param>
/// <param name="isPrivate">The new value of Privacy for the membership</param>
/// <remarks>Calls the server to make a call and update the database with the changed information</remarks>
/// <returns>The updated membership as a MembershipView object</returns>
[HttpPut]
[Route("{membershipID}/privacy")]
[StateYourBusiness(operation = Operation.UPDATE, resource = Resource.MEMBERSHIP_PRIVACY)]
public async Task<ActionResult<MembershipView>> SetPrivacyAsync(int membershipID, [FromBody] bool isPrivate)
{

var updatedMembership = await _membershipService.SetPrivacyAsync(membershipID, isPrivate);
return Ok(updatedMembership);
}

/// <summary>Update an existing membership item to be private or not</summary>
/// <param name="membershipID">The membership to set the privacy of</param>
/// <param name="isPrivate">The new value of Privacy for the membership</param>
Expand Down

0 comments on commit 88c8e06

Please sign in to comment.