Skip to content

Commit

Permalink
Add app version endpoint for platform
Browse files Browse the repository at this point in the history
  • Loading branch information
acorscadden committed Oct 3, 2017
1 parent 386792e commit 47c17e4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions breadwallet/src/Platform/BRWalletPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,12 @@ class BRWalletPlugin: BRHTTPRouterPlugin, BRWebSocketClient, Trackable {
}
return BRHTTPResponse(request: req, code: 200)
}

router.get("/_wallet/version") { (req, m) -> BRHTTPResponse in
let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] ?? ""
let build = Bundle.main.infoDictionary?["CFBundleVersion"] ?? ""
return try BRHTTPResponse(request: req, code: 200, json: ["version": version, "build": build])
}
}

private func addKeyToCache(_ key: BRKey, url: String) {
Expand Down

0 comments on commit 47c17e4

Please sign in to comment.