refactor: changed Handlers type to MultiHandler (#1360)

This commit is contained in:
Aushwin
2023-06-28 12:52:48 +00:00
committed by GitHub
parent a30c6bdf5c
commit 851f8d60aa
26 changed files with 64 additions and 58 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { Handlers, PageProps } from "$fresh/server.ts";
import { MultiHandler, PageProps } from "$fresh/server.ts";
interface Data extends Record<string, unknown> {
info: string;
@@ -8,7 +8,7 @@ export default function Page({ data }: PageProps<Data>) {
return <div>{data.info}</div>;
}
export const handler: Handlers<Data> = {
export const handler: MultiHandler<Data> = {
GET(req, { render }) {
if (req.headers.get("accept")?.includes("text/html")) {
return render({