|
@@ -75,7 +75,7 @@ func ApplicationAuthOnDeviceIdentifer(context martini.Context, params martini.Pa
|
|
|
}
|
|
|
|
|
|
app := &models.Application{}
|
|
|
- err := server.RPCCallByName(nil, "registry", "Registry.ValidateApplication", key, app)
|
|
|
+ err := server.RPCCallByName(nil, rpcs.RegistryServerName, "Registry.ValidateApplication", key, app)
|
|
|
if err != nil {
|
|
|
r.JSON(http.StatusOK, renderError(ErrAccessDenied, err))
|
|
|
return
|
|
@@ -94,7 +94,7 @@ func CheckDeviceOnline(context martini.Context, params martini.Params, req *http
|
|
|
identifier := params["identifier"]
|
|
|
|
|
|
device := &models.Device{}
|
|
|
- err := server.RPCCallByName(nil, "registry", "Registry.FindDeviceByIdentifier", identifier, device)
|
|
|
+ err := server.RPCCallByName(nil, rpcs.RegistryServerName, "Registry.FindDeviceByIdentifier", identifier, device)
|
|
|
if err != nil {
|
|
|
r.JSON(http.StatusOK, renderError(ErrDeviceNotFound, err))
|
|
|
return
|
|
@@ -119,7 +119,7 @@ func CheckDeviceIdentifier(context martini.Context, params martini.Params, req *
|
|
|
identifier := params["identifier"]
|
|
|
|
|
|
device := &models.Device{}
|
|
|
- err := server.RPCCallByName(nil, "registry", "Registry.FindDeviceByIdentifier", identifier, device)
|
|
|
+ err := server.RPCCallByName(nil, rpcs.RegistryServerName, "Registry.FindDeviceByIdentifier", identifier, device)
|
|
|
if err != nil {
|
|
|
r.JSON(http.StatusOK, renderError(ErrDeviceNotFound, err))
|
|
|
return
|
|
@@ -132,7 +132,7 @@ func CheckDeviceIdentifier(context martini.Context, params martini.Params, req *
|
|
|
func CheckProductConfig(context martini.Context, device *models.Device,
|
|
|
params martini.Params, req *http.Request, r render.Render) {
|
|
|
product := &models.Product{}
|
|
|
- err := server.RPCCallByName(nil, "registry", "Registry.FindProduct", device.ProductID, product)
|
|
|
+ err := server.RPCCallByName(nil, rpcs.RegistryServerName, "Registry.FindProduct", device.ProductID, product)
|
|
|
if err != nil {
|
|
|
r.JSON(http.StatusOK, renderError(ErrProductNotFound, err))
|
|
|
return
|