Small refactorings, better var/function names

This commit is contained in:
Deluan
2020-07-27 10:51:50 -04:00
parent ddb30ceb11
commit 4e4fcb2304
2 changed files with 12 additions and 16 deletions
+3 -3
View File
@@ -59,7 +59,7 @@ func (c *MediaAnnotationController) Star(w http.ResponseWriter, r *http.Request)
ids = append(ids, albumIds...)
ids = append(ids, artistIds...)
err := c.star(r.Context(), true, ids...)
err := c.setStar(r.Context(), true, ids...)
if err != nil {
return nil, err
}
@@ -67,7 +67,7 @@ func (c *MediaAnnotationController) Star(w http.ResponseWriter, r *http.Request)
return NewResponse(), nil
}
func (c *MediaAnnotationController) star(ctx context.Context, starred bool, ids ...string) error {
func (c *MediaAnnotationController) setStar(ctx context.Context, starred bool, ids ...string) error {
if len(ids) == 0 {
return nil
}
@@ -94,7 +94,7 @@ func (c *MediaAnnotationController) Unstar(w http.ResponseWriter, r *http.Reques
ids = append(ids, albumIds...)
ids = append(ids, artistIds...)
err := c.star(r.Context(), false, ids...)
err := c.setStar(r.Context(), false, ids...)
if err != nil {
return nil, err
}