mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 20:49:16 +00:00
21 lines
424 B
Go
21 lines
424 B
Go
package databag
|
|
|
|
import (
|
|
"log"
|
|
"encoding/json"
|
|
"net/http"
|
|
)
|
|
|
|
func GetNodeClaimable(w http.ResponseWriter, r *http.Request) {
|
|
|
|
c := getBoolConfigValue(CONFIG_CONFIGURED, false);
|
|
body, err := json.Marshal(!c);
|
|
if err != nil {
|
|
log.Println("GetNodeClaimable - failed to marshal response");
|
|
}
|
|
w.Write(body);
|
|
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
|
|
w.WriteHeader(http.StatusOK)
|
|
}
|
|
|