Proof of concept for variable album covers - GQL playground working.
This commit is contained in:
parent
193e05e7e0
commit
6408b2c0d0
|
@ -174,7 +174,6 @@ func (r *albumResolver) Thumbnail(ctx context.Context, obj *models.Album) (*mode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// err := r.Database.Raw(`
|
// err := r.Database.Raw(`
|
||||||
// WITH recursive sub_albums AS (
|
// WITH recursive sub_albums AS (
|
||||||
// SELECT * FROM albums AS root WHERE id = ?
|
// SELECT * FROM albums AS root WHERE id = ?
|
||||||
|
@ -289,8 +288,6 @@ func (r *mutationResolver) SetAlbumCoverID(ctx context.Context, albumID int, cov
|
||||||
return nil, errors.New("forbidden")
|
return nil, errors.New("forbidden")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if err := r.Database.Model(&album).Update("cover_id", coverID).Error; err != nil {
|
if err := r.Database.Model(&album).Update("cover_id", coverID).Error; err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue