Skip to content

Commit

Permalink
Merge pull request #557 from VATSIM-UK/api-key-url
Browse files Browse the repository at this point in the history
fix: change user create api key path
  • Loading branch information
AndyTWF authored Apr 30, 2024
2 parents 725f616 + af26ab2 commit f03067d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/utils/api/ApiKeyRedirectUrlBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace UKControllerPluginUtils::Api {
auto ApiKeyRedirectUrlBuilder::BuildUrl(const std::string& host, int port) const -> std::string
{
const auto redirectUrl = "http://" + host + ":" + std::to_string(port);
return impl->settings.Url() + "/admin/user-create-api-key/?redirect=" +
return impl->settings.Url() + "/user-create-api-key/?redirect=" +
curl_easy_escape(impl->curlHandle, redirectUrl.c_str(), redirectUrl.size());
}
} // namespace UKControllerPluginUtils::Api
2 changes: 1 addition & 1 deletion test/utils/api/ApiKeyRedirectUrlBuilderTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace UKControllerPluginUtilsTest::Api {
TEST_F(ApiKeyRedirectUrlBuilderTest, ItReturnsUrl)
{
EXPECT_EQ(
"https://vatsim.uk/admin/user-create-api-key/?redirect=http%3A%2F%2Flocalhost%3A62134",
"https://vatsim.uk/user-create-api-key/?redirect=http%3A%2F%2Flocalhost%3A62134",
builder.BuildUrl("localhost", 62134));
}
} // namespace UKControllerPluginUtilsTest::Api

0 comments on commit f03067d

Please sign in to comment.