Fix issue with missing user role in Redis authentication

This commit is contained in:
murtazabaanihali 2025-02-10 16:58:15 +05:30
parent bce70c1034
commit d43d134a58

View file

@ -50,7 +50,7 @@ export default async (
if (user && checkPassword(password, user.password)) {
if (redisEnabled) {
const token = await saveAuth({ userId: user.id });
const token = await saveAuth({ userId: user.id, role: user.role });
return ok(res, { token, user });
}