Skip to content

Commit

Permalink
fix brain fart
Browse files Browse the repository at this point in the history
  • Loading branch information
sjpotter committed Jul 10, 2024
1 parent 1974979 commit 71ebb23
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions packages/client/lib/commands/CLIENT_KILL.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ describe('CLIENT KILL', () => {
);
});

it('MANAGE', () => {
it('MAXAGE', () => {
assert.deepEqual(
transformArguments({
filter: ClientKillFilters.MANAGE,
filter: ClientKillFilters.MAXAGE,
maxAge: 10
}),
['CLIENT', 'KILL', 'MANAGE', '10']
['CLIENT', 'KILL', 'MAXAGE', '10']
);
});

Expand Down
8 changes: 4 additions & 4 deletions packages/client/lib/commands/CLIENT_KILL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export enum ClientKillFilters {
TYPE = 'TYPE',
USER = 'USER',
SKIP_ME = 'SKIPME',
MANAGE = 'MANAGE'
MAXAGE = 'MAXAGE'
}

interface KillFilter<T extends ClientKillFilters> {
Expand Down Expand Up @@ -38,11 +38,11 @@ type KillSkipMe = ClientKillFilters.SKIP_ME | (KillFilter<ClientKillFilters.SKIP
skipMe: boolean;
});

interface KillManage extends KillFilter<ClientKillFilters.MANAGE> {
interface KillMaxage extends KillFilter<ClientKillFilters.MAXAGE> {
maxAge: number;
}

type KillFilters = KillAddress | KillLocalAddress | KillId | KillType | KillUser | KillSkipMe | KillManage;
type KillFilters = KillAddress | KillLocalAddress | KillId | KillType | KillUser | KillSkipMe | KillMaxage;

export function transformArguments(filters: KillFilters | Array<KillFilters>): RedisCommandArguments {
const args = ['CLIENT', 'KILL'];
Expand Down Expand Up @@ -95,7 +95,7 @@ function pushFilter(args: RedisCommandArguments, filter: KillFilters): void {
args.push(filter.skipMe ? 'yes' : 'no');
break;

case ClientKillFilters.MANAGE:
case ClientKillFilters.MAXAGE:
args.push(filter.maxAge.toString());
break;
}
Expand Down

0 comments on commit 71ebb23

Please sign in to comment.