提交 v1.3.0-beta2
This commit is contained in:
@ -38,7 +38,7 @@ func (r authorisedRepository) FindByUserId(c context.Context, userId string) (it
|
||||
}
|
||||
|
||||
func (r authorisedRepository) FindById(c context.Context, id string) (item model.Authorised, err error) {
|
||||
err = r.GetDB(c).Where("id = ?", id).Find(&item).Error
|
||||
err = r.GetDB(c).Where("id = ?", id).First(&item).Error
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -115,6 +115,6 @@ func (r commandRepository) FindAll(c context.Context) (o []model.Command, err er
|
||||
}
|
||||
|
||||
func (r commandRepository) FindByUserId(c context.Context, userId string) (o []model.Command, err error) {
|
||||
err = r.GetDB(c).Where("owner = ?", userId).First(&o).Error
|
||||
err = r.GetDB(c).Where("owner = ?", userId).Find(&o).Error
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user