Skip to content

Commit

Permalink
Fix apim deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
lovoll committed Jan 26, 2024
1 parent 90eb1f1 commit f71cffc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Altinn.Profile/Controllers/UsersController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ public async Task<ActionResult<UserProfile>> Get(int userID)
/// </summary>
/// <param name="userUuid">The user uuid</param>
/// <returns>The information about a given user</returns>
[HttpGet("{userUuid:Guid}")]
[HttpGet("")]
[Authorize(Policy = "PlatformAccess")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<ActionResult<UserProfile>> Get(Guid userUuid)
public async Task<ActionResult<UserProfile>> Get([FromQuery] Guid userUuid)
{
UserProfile result = await _userProfilesWrapper.GetUserByUuid(userUuid);
if (result == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public async Task GetUsersByUuid_SblBridgeFindsProfile_ResponseOk_ReturnsUserPro
});
_webApplicationFactorySetup.SblBridgeHttpMessageHandler = messageHandler;

HttpRequestMessage httpRequestMessage = CreateGetRequest(userId, $"/profile/api/v1/users/{userUuid}");
HttpRequestMessage httpRequestMessage = CreateGetRequest(userId, $"/profile/api/v1/users?userUuid={userUuid}");

httpRequestMessage.Headers.Add("PlatformAccessToken", PrincipalUtil.GetAccessToken("ttd", "unittest"));

Expand Down Expand Up @@ -196,7 +196,7 @@ public async Task GetUsersByUuid_UserAuthenticatedMissingPlatformAccesToken_Retu
const int userId = 20000009;
Guid userUuid = new("cc86d2c7-1695-44b0-8e82-e633243fdf31");

HttpRequestMessage httpRequestMessage = CreateGetRequest(userId, $"/profile/api/v1/users/{userUuid}");
HttpRequestMessage httpRequestMessage = CreateGetRequest(userId, $"/profile/api/v1/users?userUuid={userUuid}");

HttpClient client = _webApplicationFactorySetup.GetTestServerClient();

Expand All @@ -223,7 +223,7 @@ public async Task GetUsersByUuid_SblBridgeReturnsNotFound_ResponseNotFound()
});
_webApplicationFactorySetup.SblBridgeHttpMessageHandler = messageHandler;

HttpRequestMessage httpRequestMessage = CreateGetRequest(userId, $"/profile/api/v1/users/{userUuid}");
HttpRequestMessage httpRequestMessage = CreateGetRequest(userId, $"/profile/api/v1/users?userUuid={userUuid}");

httpRequestMessage.Headers.Add("PlatformAccessToken", PrincipalUtil.GetAccessToken("ttd", "unittest"));

Expand All @@ -246,7 +246,7 @@ public async Task GetUsersByUuid_MissingAuthentication_NotAuthorized()
// Arrange
Guid userUuid = new("cc86d2c7-1695-44b0-8e82-e633243fdf31");

HttpRequestMessage httpRequestMessage = new(HttpMethod.Get, $"/profile/api/v1/users/{userUuid}");
HttpRequestMessage httpRequestMessage = new(HttpMethod.Get, $"/profile/api/v1/users?userUuid={userUuid}");

httpRequestMessage.Headers.Add("PlatformAccessToken", PrincipalUtil.GetAccessToken("ttd", "unittest"));

Expand Down

0 comments on commit f71cffc

Please sign in to comment.