Allow updating only specific columns

This commit is contained in:
Deluan
2021-06-02 18:40:29 -04:00
parent 9da9d73c1d
commit bebfe296a5
2 changed files with 15 additions and 12 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ func (r *shareRepository) Put(s *model.Share) error {
func (r *shareRepository) Update(entity interface{}, cols ...string) error {
s := entity.(*model.Share)
_, err := r.put(s.ID, s)
_, err := r.put(s.ID, s, cols...)
if err == model.ErrNotFound {
return rest.ErrNotFound
}