🐛修复bug
All checks were successful
continuous-integration/drone/tag Build is passing

This commit is contained in:
coward 2024-06-04 14:24:34 +08:00
parent 868bfc9900
commit dd01ca31a3

View File

@ -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
}