|
|
|
@@ -54,6 +54,21 @@ func GetTrackerZones(token string, client *http.Client, cfg *config.Config) ([]m |
|
|
|
return i, nil |
|
|
|
} |
|
|
|
|
|
|
|
func GetFloors(token string, client *http.Client, cfg *config.Config) ([]model.Floor, error) { |
|
|
|
res, err := getRequest(token, "getFloors", client, cfg) |
|
|
|
if err != nil { |
|
|
|
return []model.Floor{}, err |
|
|
|
} |
|
|
|
|
|
|
|
var i []model.Floor |
|
|
|
err = json.NewDecoder(res.Body).Decode(&i) |
|
|
|
if err != nil { |
|
|
|
return []model.Floor{}, err |
|
|
|
} |
|
|
|
|
|
|
|
return i, nil |
|
|
|
} |
|
|
|
|
|
|
|
func GetZones(token string, client *http.Client, cfg *config.Config) ([]model.Zone, error) { |
|
|
|
res, err := getRequest(token, "getZones", client, cfg) |
|
|
|
if err != nil { |
|
|
|
|