lijian преди 2 години
родител
ревизия
e5f21a3cf6
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      services/httpaccess/actions.go

+ 2 - 1
services/httpaccess/actions.go

@@ -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.")))