aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrien Hopkins <[email protected]>2021-08-18 14:22:32 -0500
committerAdrien Hopkins <[email protected]>2021-08-18 14:22:32 -0500
commit2a0252707890c156c008719574f0da000b853ba2 (patch)
treeaedf7738116ce534e17673d6bb506f340e03cf4b
parente4669eaf9700ecc503bee3305315256968bd05e5 (diff)
downloadcoinos-server-2a0252707890c156c008719574f0da000b853ba2.tar.gz
coinos-server-2a0252707890c156c008719574f0da000b853ba2.zip
Documented /api/info
-rw-r--r--apidoc/api_data.js37
-rw-r--r--apidoc/api_data.json37
-rw-r--r--apidoc/api_project.js2
-rw-r--r--apidoc/api_project.json2
-rw-r--r--routes/info.js9
5 files changed, 85 insertions, 2 deletions
diff --git a/apidoc/api_data.js b/apidoc/api_data.js
index 961f82a7..63c793fa 100644
--- a/apidoc/api_data.js
+++ b/apidoc/api_data.js
@@ -375,6 +375,43 @@ define({ "api": [
"groupTitle": "Admin"
},
{
+ "type": "get",
+ "url": "/info",
+ "title": "Request server information",
+ "name": "GetInfo",
+ "group": "Info",
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "Object",
+ "optional": false,
+ "field": "fx",
+ "description": "<p>Exchange rates relative to USD - fx.CUR is the value of one CUR in USD.</p>"
+ },
+ {
+ "group": "Success 200",
+ "type": "String[]",
+ "optional": false,
+ "field": "networks",
+ "description": "<p>Array of supported networks; possible values are &quot;bitcoin&quot;, &quot;liquid&quot; and &quot;lightning&quot;.</p>"
+ },
+ {
+ "group": "Success 200",
+ "type": "String",
+ "optional": false,
+ "field": "clientVersion",
+ "description": "<p>the current git commit of the ui</p>"
+ }
+ ]
+ }
+ },
+ "version": "0.0.0",
+ "filename": "routes/info.js",
+ "groupTitle": "Info"
+ },
+ {
"type": "post",
"url": "/grant",
"title": "Grant Referral code",
diff --git a/apidoc/api_data.json b/apidoc/api_data.json
index 180cbe16..5bab3ee7 100644
--- a/apidoc/api_data.json
+++ b/apidoc/api_data.json
@@ -375,6 +375,43 @@
"groupTitle": "Admin"
},
{
+ "type": "get",
+ "url": "/info",
+ "title": "Request server information",
+ "name": "GetInfo",
+ "group": "Info",
+ "success": {
+ "fields": {
+ "Success 200": [
+ {
+ "group": "Success 200",
+ "type": "Object",
+ "optional": false,
+ "field": "fx",
+ "description": "<p>Exchange rates relative to USD - fx.CUR is the value of one CUR in USD.</p>"
+ },
+ {
+ "group": "Success 200",
+ "type": "String[]",
+ "optional": false,
+ "field": "networks",
+ "description": "<p>Array of supported networks; possible values are &quot;bitcoin&quot;, &quot;liquid&quot; and &quot;lightning&quot;.</p>"
+ },
+ {
+ "group": "Success 200",
+ "type": "String",
+ "optional": false,
+ "field": "clientVersion",
+ "description": "<p>the current git commit of the ui</p>"
+ }
+ ]
+ }
+ },
+ "version": "0.0.0",
+ "filename": "routes/info.js",
+ "groupTitle": "Info"
+ },
+ {
"type": "post",
"url": "/grant",
"title": "Grant Referral code",
diff --git a/apidoc/api_project.js b/apidoc/api_project.js
index ef1b3f4c..b382cf76 100644
--- a/apidoc/api_project.js
+++ b/apidoc/api_project.js
@@ -9,7 +9,7 @@ define({
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
- "time": "2021-08-18T18:43:04.642Z",
+ "time": "2021-08-18T19:13:24.486Z",
"url": "https://apidocjs.com",
"version": "0.29.0"
}
diff --git a/apidoc/api_project.json b/apidoc/api_project.json
index 828595f0..42943876 100644
--- a/apidoc/api_project.json
+++ b/apidoc/api_project.json
@@ -9,7 +9,7 @@
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
- "time": "2021-08-18T18:43:04.642Z",
+ "time": "2021-08-18T19:13:24.486Z",
"url": "https://apidocjs.com",
"version": "0.29.0"
}
diff --git a/routes/info.js b/routes/info.js
index 6d9d5f32..8d098a2f 100644
--- a/routes/info.js
+++ b/routes/info.js
@@ -1,6 +1,15 @@
const sequelize = require("sequelize");
const { Op } = sequelize;
+/**
+ * @api {get} /info Request server information
+ * @apiName GetInfo
+ * @apiGroup Info
+ *
+ * @apiSuccess {Object} fx Exchange rates relative to USD - fx.CUR is the value of one CUR in USD.
+ * @apiSuccess {String[]} networks Array of supported networks; possible values are "bitcoin", "liquid" and "lightning".
+ * @apiSuccess {String} clientVersion the current git commit of the ui
+ */
app.get("/info", ah(async (req, res, next) => {
const { clientVersion } = config;