Skip to content

Commit

Permalink
fix(redis): Allowing delete to pass in string or string[]
Browse files Browse the repository at this point in the history
  • Loading branch information
jpinkster committed Aug 14, 2019
1 parent 9ea1de8 commit fd33e54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/services/redis/redis.service.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Inject, Injectable } from '@nestjs/common';
import { ApplicationTokens } from '../../application-tokens.const';
import { RedisException } from '../../exceptions/redis.exception';
import { ErrorHandler } from '../error-handler';
import { RedisClient } from '../../providers';
import { ErrorHandler } from '../error-handler';

@Injectable()
export class RedisService {
Expand Down Expand Up @@ -61,7 +61,7 @@ export class RedisService {
});
}

async delete(key: string) {
async delete(key: string | string[]) {
try {
await this.client.connection.del(key);
}
Expand Down

0 comments on commit fd33e54

Please sign in to comment.