Add device display names (#319)

This commit is contained in:
Paul Tötterman 2017-11-14 11:59:02 +02:00 committed by Erik Johnston
parent 8720570bb0
commit bad701c703
7 changed files with 115 additions and 19 deletions

View file

@ -364,6 +364,13 @@ func Setup(
}),
).Methods("GET")
r0mux.Handle("/devices/{deviceID}",
common.MakeAuthAPI("device_data", deviceDB, func(req *http.Request, device *authtypes.Device) util.JSONResponse {
vars := mux.Vars(req)
return UpdateDeviceByID(req, deviceDB, device, vars["deviceID"])
}),
).Methods("PUT", "OPTIONS")
// Stub implementations for sytest
r0mux.Handle("/events",
common.MakeExternalAPI("events", func(req *http.Request) util.JSONResponse {