Skip to content

Commit cca05e2

Browse files
author
aditya
committed
chore: ranking vars now accepts only json string
1 parent be9e842 commit cca05e2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ export class StreamClient<StreamFeedGenerics extends DefaultGenerics = DefaultGe
493493
}
494494

495495
replaceReactionOptions = (options: {
496-
rankingVars?: Record<string, string | number>;
496+
rankingVars?: string;
497497
reactionKindsFilter?: string[];
498498
reactions?: Record<string, string | boolean | string[] | Record<string, string | number>>;
499499
withOwnChildren?: boolean;
@@ -512,7 +512,7 @@ export class StreamClient<StreamFeedGenerics extends DefaultGenerics = DefaultGe
512512
options.withRecentReactions = options.reactions.recent as boolean;
513513
}
514514
if (options.reactions.ranking_vars != null) {
515-
options.rankingVars = options.reactions.ranking_vars as Record<string, string | number>;
515+
options.rankingVars = options.reactions.ranking_vars as string;
516516
}
517517
if (options.reactions.score_vars != null) {
518518
options.withScoreVars = options.reactions.score_vars as boolean;

src/feed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export type FeedPaginationOptions = {
4141
export type RankedFeedOptions = {
4242
offset?: number;
4343
ranking?: string;
44-
rankingVars?: Record<string, string | number>;
44+
rankingVars?: string;
4545
session?: string;
4646
withScoreVars?: boolean;
4747
};

0 commit comments

Comments
 (0)