This file (715B) exceeds the allowed full mode (48 kb) size. The editor full height is disabled, only scrolling is allowed.
If you wish to edit a file, it is recommended to use the scroll mode as some users do not like the full height mode.
export default async (options) => {
const { socket, payload } = options
try {
const redis = socket.p3xrs.ioredis
if (!redis) {
socket.emit(options.responseEvent, { status: 'error', error: 'Not connected to Redis' })
return
}
const info = await redis.call('ACL', 'GETUSER', payload.username)
const result = {}
for (let i = 0; i < info.length; i += 2) {
result[info[i]] = info[i + 1]
}
socket.emit(options.responseEvent, { status: 'ok', data: result })
} catch (e) {
console.error('acl/get-user failed', e)
socket.emit(options.responseEvent, { status: 'error', error: e.message })
}
}
| / | Focus search |
| ? | Show this help |
| Esc | Unfocus input |