Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix apim deploy #128

Merged
merged 3 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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("byuuid/{userUuid:Guid}")]
[Authorize(Policy = "PlatformAccess")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<ActionResult<UserProfile>> Get(Guid userUuid)
public async Task<ActionResult<UserProfile>> Get([FromRoute] 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/byuuid/{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/byuuid/{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/byuuid/{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/byuuid/{userUuid}");

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

Expand Down
Loading