Change response sources API

This commit is contained in:
Alexey Khit
2023-09-01 22:27:33 +03:00
parent 22787b979d
commit 0621b82aff
14 changed files with 29 additions and 29 deletions
+2 -2
View File
@@ -85,7 +85,7 @@ func apiHandle(w http.ResponseWriter, r *http.Request) {
return
}
var items []api.Source
var items []*api.Source
for _, device := range devices {
source := fmt.Sprintf(
@@ -94,7 +94,7 @@ func apiHandle(w http.ResponseWriter, r *http.Request) {
Auth.UserData.IoT.User, Auth.UserData.IoT.Pass, Auth.UserData.IoT.Domain,
device.DID, device.Key,
)
items = append(items, api.Source{Name: device.Name, URL: source})
items = append(items, &api.Source{Name: device.Name, URL: source})
}
api.ResponseSources(w, items)