0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

refactor(core): rename functions to avoid naming conflicts (#588)

This commit is contained in:
IceHe.xyz 2022-04-20 14:28:46 +08:00 committed by GitHub
parent 08ce66f317
commit 0560928ca4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -3,7 +3,7 @@ import { UserLogType, UserLogResult } from '@logto/schemas';
import { insertUserLog } from '@/queries/user-log';
import { createContextWithRouteParameters } from '@/utils/test-utils';
import koaUserLog, { WithUserLogContext, LogContext } from './koa-user-log';
import koaUserLog, { WithUserLogContext, UserLogContext } from './koa-user-log';
const nanoIdMock = 'mockId';
@ -19,7 +19,7 @@ describe('koaUserLog middleware', () => {
const insertUserLogMock = insertUserLog as jest.Mock;
const next = jest.fn();
const userLogMock: Partial<LogContext> = {
const userLogMock: Partial<UserLogContext> = {
userId: 'foo',
type: UserLogType.SignInEmail,
email: 'foo@logto.io',

View file

@ -5,10 +5,10 @@ import { nanoid } from 'nanoid';
import { insertUserLog } from '@/queries/user-log';
export type WithUserLogContext<ContextT> = ContextT & {
userLog: LogContext;
userLog: UserLogContext;
};
export interface LogContext {
export interface UserLogContext {
type?: UserLogType;
userId?: string;
username?: string;