From 038b4edebedbd18c016e921a27f205f09aff262f Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Thu, 12 Jun 2025 15:30:55 +0200 Subject: [PATCH] Update src/Api/KeyManagement/Controllers/UsersController.cs Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com> --- src/Api/KeyManagement/Controllers/UsersController.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Api/KeyManagement/Controllers/UsersController.cs b/src/Api/KeyManagement/Controllers/UsersController.cs index 9e4079f78a..e14d796238 100644 --- a/src/Api/KeyManagement/Controllers/UsersController.cs +++ b/src/Api/KeyManagement/Controllers/UsersController.cs @@ -23,10 +23,9 @@ public class UsersController( } [HttpGet("{id}/keys")] - public async Task GetAccountKeysAsync(string id) + public async Task 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); }