fix: version to contain all fields for tests
incl. additional fields for rust-ipfs-api.
@@ -17,6 +17,12 @@ pub struct Response {
version: &'static str,
commit: &'static str,
// repo is here for go-ipfs and js-ipfs but we do not have full repo at the moment
+ // empty string is accepted by the tests
+ repo: &'static str,
+ // required by rust-ipfs-api as of 0.7.0 at least
+ system: &'static str,
+ // required by rust-ipfs-api as of 0.7.0 at least
+ golang: &'static str,
}
// https://docs-beta.ipfs.io/reference/http/api/#api-v0-version
@@ -26,6 +32,9 @@ pub async fn version(_query: Query) -> Result<impl warp::Reply, std::convert::In
let response = Response {
version: env!("CARGO_PKG_VERSION"), // TODO: move over to rust-ipfs not to worry about syncing version numbers?
commit: env!("VERGEN_SHA_SHORT"),
+ repo: "",
+ system: "",
+ golang: "",
};
Ok(warp::reply::json(&response))
