mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-15 23:16:48 +00:00
25 lines
402 B
Go
25 lines
402 B
Go
package main
|
|
|
|
import (
|
|
"encoding/json"
|
|
"net/http"
|
|
)
|
|
|
|
func getAllSettings(w http.ResponseWriter, r *http.Request) {
|
|
|
|
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
|
|
w.WriteHeader(http.StatusOK)
|
|
if err := json.NewEncoder(w).Encode(bot.config); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|
|
|
|
var configRoutes = Routes{
|
|
Route{
|
|
"GetAllSettings",
|
|
"GET",
|
|
"/config/all",
|
|
getAllSettings,
|
|
},
|
|
}
|