Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 committed Feb 8, 2023
1 parent 174c247 commit e3d00d6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
5 changes: 0 additions & 5 deletions internal/grpc/services/ocmshareprovider/ocmshareprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ func (s *service) RemoveOCMShare(ctx context.Context, req *ocm.RemoveOCMShareReq
return &ocm.RemoveOCMShareResponse{
Status: status.NewNotFound(ctx, "share does not exist"),
}, nil

}
return &ocm.RemoveOCMShareResponse{
Status: status.NewInternal(ctx, err, "error removing share"),
Expand All @@ -340,7 +339,6 @@ func (s *service) GetOCMShare(ctx context.Context, req *ocm.GetOCMShareRequest)
return &ocm.GetOCMShareResponse{
Status: status.NewNotFound(ctx, "share does not exist"),
}, nil

}
return &ocm.GetOCMShareResponse{
Status: status.NewInternal(ctx, err, "error getting share"),
Expand Down Expand Up @@ -377,7 +375,6 @@ func (s *service) UpdateOCMShare(ctx context.Context, req *ocm.UpdateOCMShareReq
return &ocm.UpdateOCMShareResponse{
Status: status.NewNotFound(ctx, "share does not exist"),
}, nil

}
return &ocm.UpdateOCMShareResponse{
Status: status.NewInternal(ctx, err, "error updating share"),
Expand Down Expand Up @@ -414,7 +411,6 @@ func (s *service) UpdateReceivedOCMShare(ctx context.Context, req *ocm.UpdateRec
return &ocm.UpdateReceivedOCMShareResponse{
Status: status.NewNotFound(ctx, "share does not exist"),
}, nil

}
return &ocm.UpdateReceivedOCMShareResponse{
Status: status.NewInternal(ctx, err, "error updating received share"),
Expand All @@ -435,7 +431,6 @@ func (s *service) GetReceivedOCMShare(ctx context.Context, req *ocm.GetReceivedO
return &ocm.GetReceivedOCMShareResponse{
Status: status.NewNotFound(ctx, "share does not exist"),
}, nil

}
return &ocm.GetReceivedOCMShareResponse{
Status: status.NewInternal(ctx, err, "error getting received share"),
Expand Down
5 changes: 1 addition & 4 deletions pkg/ocm/share/repository/json/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,7 @@ func (m *mgr) DeleteShare(ctx context.Context, user *userpb.User, ref *ocm.Share
if sharesEqual(ref, share) {
if utils.UserEqual(user.Id, share.Owner) || utils.UserEqual(user.Id, share.Creator) {
delete(m.model.Shares, id)
if err := m.save(); err != nil {
return err
}
return nil
return m.save()
}
}
}
Expand Down

0 comments on commit e3d00d6

Please sign in to comment.