Skip to content

Commit

Permalink
fix(platform-log-request): use DIContext as base type instead BaseCon…
Browse files Browse the repository at this point in the history
…text
  • Loading branch information
Romakita committed Nov 8, 2024
1 parent 25db0e3 commit 5a1a380
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type {BaseContext} from "@tsed/di";
import type {DIContext} from "@tsed/di";

export type AlterLogCallback = (
level: "debug" | "info" | "warn" | "error" | "all",
obj: Record<string, unknown>,
ctx: BaseContext
ctx: DIContext
) => Record<string, unknown>;

export interface PlatformLogRequestSettings {
Expand All @@ -18,7 +18,7 @@ export interface PlatformLogRequestSettings {
/**
* A function to log the server response.
*/
onLogResponse?: ($ctx: BaseContext) => void;
onLogResponse?: ($ctx: DIContext) => void;
}

declare global {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type {BaseContext} from "@tsed/di";
import type {DIContext} from "@tsed/di";

export function defaultAlterLog(level: string, obj: Record<string, unknown>, ctx: BaseContext) {
export function defaultAlterLog(level: string, obj: Record<string, unknown>, ctx: DIContext) {
const minimalLog = {
method: ctx.request.method,
url: ctx.request.url,
Expand Down

0 comments on commit 5a1a380

Please sign in to comment.