Changes
This commit is contained in:
parent
9eac960763
commit
da9196f389
22 changed files with 302 additions and 76 deletions
|
@ -7,10 +7,10 @@ import (
|
|||
"net/http"
|
||||
"os"
|
||||
|
||||
"nutfactory.org/Matrix/config"
|
||||
"nutfactory.org/Matrix/entities/device"
|
||||
"nutfactory.org/Matrix/utils"
|
||||
"nutfactory.org/Matrix/utils/database"
|
||||
"git.nutfactory.org/hoernschen/Matrix/config"
|
||||
"git.nutfactory.org/hoernschen/Matrix/entities/device"
|
||||
"git.nutfactory.org/hoernschen/Matrix/utils"
|
||||
"git.nutfactory.org/hoernschen/Matrix/utils/database"
|
||||
)
|
||||
|
||||
type resolveServerNameResponse struct {
|
||||
|
@ -26,7 +26,7 @@ type serverImplementation struct {
|
|||
Version string `json:"version,omitempty"`
|
||||
}
|
||||
|
||||
type resetBody struct {
|
||||
type ResetBody struct {
|
||||
Packetloss float32 `json:"packetloss,omitempty"`
|
||||
UnavailableTill int `json:"unavailableTill,omitempty"`
|
||||
AuthentificationCheck bool `json:"authentificationCheck,omitempty"`
|
||||
|
@ -52,9 +52,10 @@ func GetServerImplementation(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: Add a function to set the Config-Params
|
||||
func Reset(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
|
||||
request := resetBody{}
|
||||
request := ResetBody{}
|
||||
errResponse := utils.CheckRequest(r)
|
||||
if errResponse != nil {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue