Initial commit: Telegram Management System
Some checks failed
Deploy / deploy (push) Has been cancelled

Full-stack web application for Telegram management
- Frontend: Vue 3 + Vben Admin
- Backend: NestJS
- Features: User management, group broadcast, statistics

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
你的用户名
2025-11-04 15:37:50 +08:00
commit 237c7802e5
3674 changed files with 525172 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
import redis from 'redis-mock';
let redisClient;
export const connectRedis = async () => {
redisClient = redis.createClient();
return redisClient;
};
export const closeRedis = async () => {
if (redisClient) {
await redisClient.quit();
}
};
export const clearRedis = async () => {
if (redisClient) {
await redisClient.flushall();
}
};
export const getRedisClient = () => redisClient;
// Mock Redis methods for testing
export const mockRedisClient = {
get: jest.fn(),
set: jest.fn(),
del: jest.fn(),
exists: jest.fn(),
expire: jest.fn(),
ttl: jest.fn(),
hget: jest.fn(),
hset: jest.fn(),
hdel: jest.fn(),
hgetall: jest.fn(),
sadd: jest.fn(),
srem: jest.fn(),
smembers: jest.fn(),
sismember: jest.fn(),
zadd: jest.fn(),
zrem: jest.fn(),
zrange: jest.fn(),
zrevrange: jest.fn(),
publish: jest.fn(),
subscribe: jest.fn(),
unsubscribe: jest.fn(),
on: jest.fn(),
quit: jest.fn(),
};