This commit is contained in:
parent
868bfc9900
commit
dd01ca31a3
@ -194,7 +194,7 @@ func (r clientRepo) GetById(id string) (data entity.Client, err error) {
|
||||
// @return data
|
||||
// @return err
|
||||
func (r clientRepo) GetByPublicKey(publicKey string) (data entity.Client, err error) {
|
||||
err = r.Model(&entity.Client{}).Where("keys->$.publicKey = ?", publicKey).Preload("Server").First(&data).Error
|
||||
err = r.Model(&entity.Client{}).Where("json_extract(keys, '.publicKey') = ?", publicKey).Preload("Server").First(&data).Error
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user