|
@@ -324,13 +324,13 @@ func AppAuth(req *http.Request, r render.Render) {
|
|
|
}
|
|
|
|
|
|
func CheckDeviceNetConfig(req *http.Request, r render.Render) {
|
|
|
- var params *rpcs.ArgsCheckDeviceNetConfig
|
|
|
+ var params rpcs.ArgsCheckDeviceNetConfig
|
|
|
params.DeviceCode = req.URL.Query().Get("device_code")
|
|
|
params.Md5 = req.URL.Query().Get("md5")
|
|
|
var reply rpcs.ReplyCheckDeviceNetConfig
|
|
|
err := server.RPCCallByName(nil, rpcs.RegistryServerName, "Registry.CheckDeviceNetConfig", ¶ms, &reply)
|
|
|
if err != nil {
|
|
|
- r.JSON(http.StatusOK, renderError(ErrWrongSecret, errors.New("invalid secret key")))
|
|
|
+ r.JSON(http.StatusOK, renderError(ErrSystemFault, err))
|
|
|
return
|
|
|
}
|
|
|
r.JSON(http.StatusOK, Common{
|