|
@@ -4,6 +4,7 @@ import (
|
|
|
"context"
|
|
|
"encoding/hex"
|
|
|
"errors"
|
|
|
+ "fmt"
|
|
|
"math/rand"
|
|
|
"net/http"
|
|
|
"sparrow/pkg/models"
|
|
@@ -94,7 +95,7 @@ func AuthDevice(args DeviceAuthArgs, r render.Render) {
|
|
|
r.JSON(http.StatusOK, renderError(ErrDeviceNotFound, err))
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+ fmt.Printf(fmt.Sprintf("%s, %s", device.DeviceSecret, args.DeviceSecret))
|
|
|
if device.DeviceSecret != args.DeviceSecret {
|
|
|
// device secret is wrong.
|
|
|
r.JSON(http.StatusOK, renderError(ErrWrongSecret, errors.New("wrong device secret.")))
|