Skip to content

Commit

Permalink
adaptation to Fresh 1.4 Plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Octo8080X committed Aug 23, 2023
1 parent 1c81ea8 commit c95e7a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion deps.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { type MiddlewareHandlerContext, type MiddlewareHandler } from "https://deno.land/x/[email protected]/server.ts";
export { type Plugin } from "https://deno.land/x/fresh@1.3.1/src/server/types.ts"
export { type Plugin } from "https://deno.land/x/fresh@1.4.2/src/server/types.ts"
export { nanoid } from "https://cdn.jsdelivr.net/npm/nanoid/nanoid.js";
4 changes: 2 additions & 2 deletions src/loggerPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
type RemoteLogSenderFunction,
} from "./loggerModule.ts";

export function getLoggerHandler(logSender?: RemoteLogSenderFunction): Plugin {
export function getLoggerHandler(logSender?: RemoteLogSenderFunction): Plugin<Logger> {
const handler: MiddlewareHandler<Logger> = async function (
_req: Request,
ctx: MiddlewareHandlerContext<Logger>
Expand All @@ -23,7 +23,7 @@ export function getLoggerHandler(logSender?: RemoteLogSenderFunction): Plugin {
middlewares: [
{
middleware: {
handler: handler as MiddlewareHandler<Record<"logger", unknown>>,
handler: handler,
},
path: "/",
},
Expand Down

0 comments on commit c95e7a0

Please sign in to comment.