fix openapi bug

master
winc-link 2023-09-12 13:37:32 +08:00
parent 963d1fa1fc
commit 78b8e351bd
3 changed files with 5 additions and 3 deletions

2
.gitignore vendored
View File

@ -6,6 +6,8 @@
vendor
logs
go.sum
hummingbird
manifest
## MacOS
.DS_Store

View File

@ -130,12 +130,12 @@ func (p *deviceApp) SetDeviceProperty(req dtos.OpenApiSetDeviceThingModel) error
device, err := p.dbClient.DeviceById(req.DeviceId)
if err != nil {
return nil
return err
}
_, err = p.dbClient.ProductById(device.ProductId)
if err != nil {
return nil
return err
}
//var findCode bool
//

View File

@ -206,7 +206,7 @@ func (uapp *userApp) CreateTokenDetail(userName string) (*dtos.TokenDetail, erro
userID uint = 1
err error
)
td.AccessToken, err = uapp.createToken(userID, userName, td.AtExpires, jwt2.OpenAPIKey)
td.AccessToken, err = uapp.createToken(userID, userName, td.AtExpires, jwt2.JwtSignKey)
if err != nil {
return nil, err
}