[#160] support expand query parameter for create and update requests

This commit is contained in:
Gani Georgiev
2022-07-19 13:09:54 +03:00
parent 73fb12c2bc
commit 383b2a1279
22 changed files with 398 additions and 207 deletions

View File

@@ -150,6 +150,10 @@ func (dao *Dao) IsRecordValueUnique(
// FindUserRelatedRecords returns all records that has a reference
// to the provided User model (via the user shema field).
func (dao *Dao) FindUserRelatedRecords(user *models.User) ([]*models.Record, error) {
if user.Id == "" {
return []*models.Record{}, nil
}
collections, err := dao.FindCollectionsWithUserFields()
if err != nil {
return nil, err