Add GetAdminStatus endpoint that is compatible with admin auth

This commit is contained in:
Gabe Kangas
2020-10-25 18:56:53 -07:00
parent 8ed21d303f
commit 903c977b13
2 changed files with 11 additions and 0 deletions

View File

@@ -17,3 +17,11 @@ func GetStatus(w http.ResponseWriter, r *http.Request) {
json.NewEncoder(w).Encode(status)
}
//GetStatus gets the status of the server
func GetAdminStatus(w http.ResponseWriter, r *http.Request) {
status := core.GetStatus()
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(status)
}