diff --git a/app/Store/NotificationStore.ts b/app/Store/NotificationStore.ts index 50e90e0..dd98e57 100644 --- a/app/Store/NotificationStore.ts +++ b/app/Store/NotificationStore.ts @@ -52,6 +52,8 @@ class RedisNotificationStore { } public async del(userId: string, keys: string[]): Promise { + if (keys.length === 0) return 0; + const k = keys.map(v => `notification:${v}`); const count = await this.redisClient.zrem(`user:${userId}`, k); await this.redisClient.del(k);