refactor: removed unused code, unnecessary typecasts and fixed small warnings

This commit is contained in:
Deluan
2020-03-20 00:02:31 -04:00
parent 270b0ae74e
commit f6e448c1ba
10 changed files with 8 additions and 162 deletions
+3 -3
View File
@@ -73,15 +73,15 @@ func (p *playlists) Delete(ctx context.Context, playlistId string) error {
func (p *playlists) Update(ctx context.Context, playlistId string, name *string, idsToAdd []string, idxToRemove []int) error {
pls, err := p.ds.Playlist(ctx).Get(playlistId)
if err != nil {
return err
}
owner := p.getUser(ctx)
if owner != pls.Owner {
return model.ErrNotAuthorized
}
if err != nil {
return err
}
if name != nil {
pls.Name = *name
}