Skip to content
New issue

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

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

Already on GitHub? # to your account

FLX-571 Add api version to GET on /system/version #753

Merged
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
1 change: 1 addition & 0 deletions flecs/modules/version/src/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ auto version_t::http_version() const //

auto response = json_t{};
response["core"] = core_version();
response["api"] = api_version();

return crow::response{crow::status::OK, "json", response.dump()};
}
Expand Down
2 changes: 1 addition & 1 deletion flecs/modules/version/test/test_version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ TEST(module_version, print_version)
auto req = crow::request{};
auto res = crow::response{};

const auto json_expected = flecs::json_t({{"core", FLECS_VERSION + "-"s + FLECS_GIT_SHA}});
const auto json_expected = flecs::json_t({{"core", FLECS_VERSION + "-"s + FLECS_GIT_SHA}, {"api", FLECS_API_VERSION}});

req.url = "/v2/system/version";
flecs::flecs_api_t::instance().app().handle(req, res);
Expand Down