mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 15:47:13 +01:00
Updated redis calls.
This commit is contained in:
parent
bb5affe29a
commit
62a8b29453
9 changed files with 41 additions and 27 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import redis from '@umami/redis-client';
|
||||
import { redisEnabled } from '@umami/redis-client';
|
||||
import { saveAuth } from 'lib/auth';
|
||||
import { secret } from 'lib/crypto';
|
||||
import { useValidate } from 'lib/middleware';
|
||||
|
|
@ -49,7 +49,7 @@ export default async (
|
|||
const user = await getUserByUsername(username, { includePassword: true });
|
||||
|
||||
if (user && checkPassword(password, user.password)) {
|
||||
if (redis.enabled) {
|
||||
if (redisEnabled) {
|
||||
const token = await saveAuth({ userId: user.id });
|
||||
|
||||
return ok(res, { token, user });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue