Removed dev logging.

This commit is contained in:
Mike Cao 2024-04-14 00:58:57 -07:00
parent 1579beef5b
commit 0ea97eb0bc

View File

@ -1,5 +1,4 @@
import redis from '@umami/redis-client'; import redis from '@umami/redis-client';
import debug from 'debug';
import { saveAuth } from 'lib/auth'; import { saveAuth } from 'lib/auth';
import { secret } from 'lib/crypto'; import { secret } from 'lib/crypto';
import { useValidate } from 'lib/middleware'; import { useValidate } from 'lib/middleware';
@ -16,9 +15,6 @@ import {
import { getUserByUsername } from 'queries'; import { getUserByUsername } from 'queries';
import * as yup from 'yup'; import * as yup from 'yup';
import { ROLES } from 'lib/constants'; import { ROLES } from 'lib/constants';
import { getIpAddress } from 'lib/detect';
const log = debug('umami:auth');
export interface LoginRequestBody { export interface LoginRequestBody {
username: string; username: string;
@ -68,13 +64,6 @@ export default async (
}); });
} }
log(
`Login from ip ${getIpAddress(req)} with username "${username.replace(
/["\r\n]/g,
'',
)}" failed.`,
);
return unauthorized(res, 'message.incorrect-username-password'); return unauthorized(res, 'message.incorrect-username-password');
} }