mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 00:53:33 +00:00
fix: redis issue in user management
This commit is contained in:
@@ -1294,6 +1294,32 @@ class RedisClient {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
// 🔧 Basic Redis operations wrapper methods for convenience
|
||||
async get(key) {
|
||||
const client = this.getClientSafe()
|
||||
return await client.get(key)
|
||||
}
|
||||
|
||||
async set(key, value, ...args) {
|
||||
const client = this.getClientSafe()
|
||||
return await client.set(key, value, ...args)
|
||||
}
|
||||
|
||||
async setex(key, ttl, value) {
|
||||
const client = this.getClientSafe()
|
||||
return await client.setex(key, ttl, value)
|
||||
}
|
||||
|
||||
async del(...keys) {
|
||||
const client = this.getClientSafe()
|
||||
return await client.del(...keys)
|
||||
}
|
||||
|
||||
async keys(pattern) {
|
||||
const client = this.getClientSafe()
|
||||
return await client.keys(pattern)
|
||||
}
|
||||
}
|
||||
|
||||
const redisClient = new RedisClient()
|
||||
|
||||
Reference in New Issue
Block a user