2022-01-15 21:45:37 +00:00
|
|
|
package databag
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
func GetNodeConfig(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
|
|
|
// validate login
|
2022-06-06 22:18:45 +00:00
|
|
|
if code, err := ParamAdminToken(r); err != nil {
|
|
|
|
ErrResponse(w, code, err)
|
2022-01-15 21:45:37 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// get node config fields
|
|
|
|
var config NodeConfig;
|
2022-07-22 18:01:29 +00:00
|
|
|
config.Domain = getStrConfigValue(CNFDomain, "");
|
|
|
|
config.AccountLimit = getNumConfigValue(CNFAccountLimit, 16);
|
|
|
|
config.OpenAccess = getBoolConfigValue(CNFOpenAccess, true);
|
|
|
|
config.AccountStorage = getNumConfigValue(CNFStorage, 0);
|
2022-01-15 21:45:37 +00:00
|
|
|
|
2022-01-16 07:25:43 +00:00
|
|
|
WriteResponse(w, config);
|
2022-01-15 21:45:37 +00:00
|
|
|
}
|
|
|
|
|