mirror of
https://github.com/bitwarden/server.git
synced 2025-06-20 02:48:03 -05:00
Update src/Api/KeyManagement/Controllers/UsersController.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
This commit is contained in:
parent
a417aa72e8
commit
038b4edebe
@ -23,10 +23,9 @@ public class UsersController(
|
||||
}
|
||||
|
||||
[HttpGet("{id}/keys")]
|
||||
public async Task<PublicKeysResponseModel> GetAccountKeysAsync(string id)
|
||||
public async Task<PublicKeysResponseModel> GetAccountKeysAsync([FromRoute]Guid id)
|
||||
{
|
||||
var guidId = new Guid(id);
|
||||
var user = await _userRepository.GetByIdAsync(guidId) ?? throw new NotFoundException();
|
||||
var user = await _userRepository.GetByIdAsync(id) ?? throw new NotFoundException();
|
||||
var accountKeys = await _userAccountKeysQuery.Run(user) ?? throw new NotFoundException("User account keys not found.");
|
||||
return new PublicKeysResponseModel(accountKeys);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user