From c017cd7979409b3c4403caf092c93c1a7f90a562 Mon Sep 17 00:00:00 2001 From: hezhuozhuo <“421045249@qq.com”> Date: Wed, 27 Sep 2023 14:30:17 +0800 Subject: [PATCH 1/4] fix bug --- services/device_service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/device_service.go b/services/device_service.go index 0370db5d0..aa9253898 100644 --- a/services/device_service.go +++ b/services/device_service.go @@ -1065,7 +1065,7 @@ func (*DeviceService) GetConfigByToken(token string, deviceId string) (map[strin config := DeviceConfig{ ProtocolType: device.Protocol, - AccessToken: token, + AccessToken: device.Token, DeviceType: device.DeviceType, ID: device.ID, DeviceConfig: protocolConfig, From f8a8e5b787670258d8cc2507bebb57a39c89fc3c Mon Sep 17 00:00:00 2001 From: hezhuozhuo <“421045249@qq.com”> Date: Wed, 27 Sep 2023 14:32:03 +0800 Subject: [PATCH 2/4] update --- grpc/protocol_plugin/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/grpc/protocol_plugin/README.md b/grpc/protocol_plugin/README.md index 50849724a..bf792ae4e 100644 --- a/grpc/protocol_plugin/README.md +++ b/grpc/protocol_plugin/README.md @@ -1,3 +1,5 @@ -### 重新生成gRPC代码,编译proto +# ThingsPanel提供给协议插件的grpc服务 + +## 重新生成gRPC代码,编译proto protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative protocol_plugin.proto From abc483ba0240fa7bc40dba09091917b124d813c5 Mon Sep 17 00:00:00 2001 From: hezhuozhuo <“421045249@qq.com”> Date: Wed, 27 Sep 2023 14:33:48 +0800 Subject: [PATCH 3/4] update --- grpc/protocol_plugin/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/grpc/protocol_plugin/README.md b/grpc/protocol_plugin/README.md index bf792ae4e..9f4779789 100644 --- a/grpc/protocol_plugin/README.md +++ b/grpc/protocol_plugin/README.md @@ -1,5 +1,6 @@ # ThingsPanel提供给协议插件的grpc服务 + ## 重新生成gRPC代码,编译proto protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative protocol_plugin.proto From 80ba227a1239cb232894318ea231947212a4a80c Mon Sep 17 00:00:00 2001 From: hezhuozhuo <“421045249@qq.com”> Date: Wed, 27 Sep 2023 15:57:07 +0800 Subject: [PATCH 4/4] fixbug --- validate/login_validate.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/validate/login_validate.go b/validate/login_validate.go index c76b16ed8..697fb3d2b 100644 --- a/validate/login_validate.go +++ b/validate/login_validate.go @@ -4,7 +4,7 @@ package valid type LoginValidate struct { PhoneNumber string `json:"phone_number" alias:"手机号" valid:"MaxSize(11)"` Email string `json:"email" alias:"用户名" valid:"MaxSize(100)"` - Password string `json:"password" alias:"密码" valid:"MinSize(6)"` + Password string `json:"password" alias:"密码" valid:"MaxSize(100)"` VerificationCode string `json:"verification_code" alias:"验证码" valid:"MaxSize(36)"` } @@ -24,7 +24,6 @@ type TenantRegisterValidate struct { VerificationCode string `json:"verification_code" alias:"验证码" valid:"Required;MaxSize(36)"` } - // ChangePassword 校验 type ChangePasswordValidate struct { PhoneNumber string `json:"phone_number" alias:"手机号" valid:"Required;MaxSize(11)"`