mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Refactored queries.
This commit is contained in:
parent
f36a689817
commit
8904b7b4ed
27 changed files with 137 additions and 144 deletions
|
|
@ -9,7 +9,7 @@ import {
|
|||
methodNotAllowed,
|
||||
} from 'next-basics';
|
||||
import redis from '@umami/redis-client';
|
||||
import { getUser } from 'queries';
|
||||
import { getUserByUsername } from 'queries';
|
||||
import { secret } from 'lib/crypto';
|
||||
import { NextApiRequestQueryBody, User } from 'lib/types';
|
||||
import { setAuthKey } from 'lib/auth';
|
||||
|
|
@ -37,7 +37,7 @@ export default async (
|
|||
return badRequest(res);
|
||||
}
|
||||
|
||||
const user = await getUser({ username }, { includePassword: true });
|
||||
const user = await getUserByUsername(username, { includePassword: true });
|
||||
|
||||
if (user && checkPassword(password, user.password)) {
|
||||
if (redis.enabled) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue