|
@@ -39,22 +39,22 @@ func route(m *martini.ClassicMartini) {
|
|
|
|
|
|
// get devie current status
|
|
|
r.Get("/devices/:identifier/status/current",
|
|
|
- ApplicationAuthOnDeviceIdentifer, CheckDeviceOnline, CheckProductConfig,
|
|
|
+ ApplicationAuthOnDeviceIdentifer, CheckDeviceOnline,
|
|
|
GetDeviceCurrentStatus)
|
|
|
|
|
|
// get devie latest status
|
|
|
r.Get("/devices/:identifier/status/latest",
|
|
|
- ApplicationAuthOnDeviceIdentifer, CheckDeviceOnline, CheckProductConfig,
|
|
|
+ ApplicationAuthOnDeviceIdentifer, CheckDeviceOnline,
|
|
|
GetDeviceLatestStatus)
|
|
|
|
|
|
// set device status
|
|
|
r.Put("/devices/:identifier/status",
|
|
|
- ApplicationAuthOnDeviceIdentifer, CheckDeviceOnline, CheckProductConfig,
|
|
|
+ ApplicationAuthOnDeviceIdentifer, CheckDeviceOnline,
|
|
|
SetDeviceStatus)
|
|
|
|
|
|
// send a command to device
|
|
|
r.Post("/devices/:identifier/commands",
|
|
|
- ApplicationAuthOnDeviceIdentifer, CheckDeviceOnline, CheckProductConfig,
|
|
|
+ ApplicationAuthOnDeviceIdentifer, CheckDeviceOnline,
|
|
|
SendCommandToDevice)
|
|
|
|
|
|
// and a rule to device
|