Using squirrel to generalize SQL search

This commit is contained in:
Deluan
2020-01-13 15:28:55 -05:00
committed by Deluan Quintão
parent d3af7e689d
commit c2448d3880
10 changed files with 134 additions and 34 deletions
+3 -1
View File
@@ -41,7 +41,9 @@ func NewAlbumRepository() domain.AlbumRepository {
func (r *albumRepository) Put(a *domain.Album) error {
ta := Album(*a)
return r.put(a.ID, &ta)
return WithTx(func(o orm.Ormer) error {
return r.put(o, a.ID, &ta)
})
}
func (r *albumRepository) Get(id string) (*domain.Album, error) {