Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
November-12 committed Sep 27, 2023
2 parents a646b33 + 3ae2ce9 commit f1ab1f2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 4 additions & 1 deletion grpc/protocol_plugin/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 重新生成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

2 changes: 1 addition & 1 deletion services/device_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions validate/login_validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)"`
}

Expand All @@ -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)"`
Expand Down

0 comments on commit f1ab1f2

Please sign in to comment.