Fix error comparisons

This commit is contained in:
Deluan
2022-09-30 18:54:25 -04:00
parent 7b0a8f47de
commit db67c1277e
27 changed files with 93 additions and 73 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ package persistence
import (
"context"
"encoding/json"
"errors"
"strings"
"time"
@@ -395,7 +396,7 @@ func (r *playlistRepository) Update(id string, entity interface{}, cols ...strin
pls.ID = id
pls.UpdatedAt = time.Now()
_, err = r.put(id, pls, append(cols, "updatedAt")...)
if err == model.ErrNotFound {
if errors.Is(err, model.ErrNotFound) {
return rest.ErrNotFound
}
return err