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:
parent
08ce66f317
commit
0560928ca4
2 changed files with 4 additions and 4 deletions
|
@ -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',
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue