1
0
mirror of https://github.com/bitwarden/server synced 2025-12-14 15:23:42 +00:00

[PM-10325] Rename OrganizationUser Delete and BulkDelete endpoints to Remove and BulkRemove (#4711)

* Rename IDeleteOrganizationUserCommand to IRemoveOrganizationUserCommand

* Rename IOrganizationService DeleteUser methods to RemoveUser

* Rename API endpoints for deleting organization users to "Remove"

* chore: Rename Delete method to Remove in MembersController
This commit is contained in:
Rui Tomé
2024-09-04 11:18:23 +01:00
committed by GitHub
parent b40bf11884
commit 471851978b
17 changed files with 87 additions and 87 deletions

View File

@@ -226,24 +226,24 @@ public class MembersController : Controller
}
/// <summary>
/// Delete a member.
/// Remove a member.
/// </summary>
/// <remarks>
/// Permanently deletes a member from the organization. This cannot be undone.
/// Permanently removes a member from the organization. This cannot be undone.
/// The user account will still remain. The user is only removed from the organization.
/// </remarks>
/// <param name="id">The identifier of the member to be deleted.</param>
/// <param name="id">The identifier of the member to be removed.</param>
[HttpDelete("{id}")]
[ProducesResponseType((int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.NotFound)]
public async Task<IActionResult> Delete(Guid id)
public async Task<IActionResult> Remove(Guid id)
{
var user = await _organizationUserRepository.GetByIdAsync(id);
if (user == null || user.OrganizationId != _currentContext.OrganizationId)
{
return new NotFoundResult();
}
await _organizationService.DeleteUserAsync(_currentContext.OrganizationId.Value, id, null);
await _organizationService.RemoveUserAsync(_currentContext.OrganizationId.Value, id, null);
return new OkResult();
}