Skip to content

Commit

Permalink
Fixed broken removal of favourites
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegeens committed Nov 13, 2024
1 parent d7a0558 commit d61e5e2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/eosclient/eosgrpc/eosgrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,15 @@ func (c *Client) UnsetAttr(ctx context.Context, auth eosclient.Authorization, at
log := appctx.GetLogger(ctx)
log.Info().Str("func", "UnsetAttr").Str("uid,gid", auth.Role.UID+","+auth.Role.GID).Str("path", path).Msg("")

// Favorites need to be stored per user so handle these separately
if attr.Type == eosclient.UserAttr && attr.Key == favoritesKey {
info, err := c.GetFileInfoByPath(ctx, auth, path)
if err != nil {
return err
}
return c.handleFavAttr(ctx, auth, attr, recursive, path, info, false)
}

// Initialize the common fields of the NSReq
rq, err := c.initNSRequest(ctx, auth, app)
if err != nil {
Expand Down

0 comments on commit d61e5e2

Please sign in to comment.