aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2021-02-26 03:29:18 +0000
committerterminaldweller <thabogre@gmail.com>2021-02-26 03:29:18 +0000
commit09d2e7b1a5369d7bdc9086de25610b682fab15af (patch)
treee7a221fbdfe0535f905365baa958e8f8d957ca5d
parentadded a health endpoint. change endpoint name to alert. added a health endpoi... (diff)
downloadhived-09d2e7b1a5369d7bdc9086de25610b682fab15af.tar.gz
hived-09d2e7b1a5369d7bdc9086de25610b682fab15af.zip
fixed a typo. updated README
Diffstat (limited to '')
-rw-r--r--README.md7
-rw-r--r--hived.go3
2 files changed, 6 insertions, 4 deletions
diff --git a/README.md b/README.md
index b301084..5f55cc2 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
* hived is currently using redis as its DB because its tiny and fast.<br/>
* It sends notifications through telegram.<br/>
-Currently it has 4 endpoint:<br/>
+Currently it has 5 endpoint:<br/>
### /price
Lets you ask for the price of the currency. You can determine the currency the value is returned in.<br/>
@@ -31,6 +31,9 @@ Gets the list of currencies that are available to be traded.<br/>
You can check under `./test` for some examples of curl commands.<br/>
+### /health
+Returns the health status of the service.<br/>
+
## How to Run
Before you can run this, you need a [telegram bot token](https://core.telegram.org/bots#6-botfather) and a [changelly](https://changelly.com/) API key.<br/>
The keys are put in files and then given to Docker as secrets.The docker entrypoint script then exports these as environment variables.<br/>
@@ -53,7 +56,7 @@ Both the server itself and the redis image are alpine-based so they're pretty sm
You can find the swagger and postman docs under `/api`.<br/>
## TODO
-* fix travis
+* ~~fix travis~~
* add unit tests
* fix `hived -help` crashing
* haproxy-ssl-termination
diff --git a/hived.go b/hived.go
index a1cd988..2dc7492 100644
--- a/hived.go
+++ b/hived.go
@@ -27,7 +27,6 @@ import (
var flagPort = flag.String("port", "8008", "determined the port the sercice runs on")
-var alertFile = flag.String("alertfile", "/run/secrets/alerts", "determines the locaiton of the alert files")
var alertsCheckInterval = flag.Int64("alertinterval", 600., "in seconds, the amount of time between alert checks")
var redisAddress = flag.String("redisaddress", "redis:6379", "determines the address of the redis instance")
var redisPassword = flag.String("redispassword", "", "determines the password of the redis db")
@@ -455,7 +454,7 @@ func handleAlertDelete(w http.ResponseWriter, r *http.Request) {
params := r.URL.Query()
for key, value := range params {
switch key {
- case "Id":
+ case "id":
Id = value[0]
default:
log.Error().Err(errors.New("bad parameters for the crypto endpoint."))