Use new rest lib (Update receives all columns that need to be updated)

This commit is contained in:
Deluan
2021-11-01 13:55:47 -04:00
parent b2acec0a09
commit 778f474d26
14 changed files with 46 additions and 26 deletions
+2 -1
View File
@@ -209,8 +209,9 @@ func (r *mediaFileRepository) Save(entity interface{}) (string, error) {
return mf.ID, err
}
func (r *mediaFileRepository) Update(entity interface{}, cols ...string) error {
func (r *mediaFileRepository) Update(id string, entity interface{}, cols ...string) error {
mf := entity.(*model.MediaFile)
mf.ID = id
return r.Put(mf)
}