major: import Fresh 2.0 code (#2449)

🎉
This commit is contained in:
Marvin Hagemeister
2024-05-24 09:40:08 +02:00
committed by GitHub
parent 990357629e
commit 287929e4d2
958 changed files with 15794 additions and 28287 deletions
+3 -4
View File
@@ -1,5 +1,4 @@
import { RouteConfig } from "$fresh/server.ts";
import { Handlers } from "$fresh/server.ts";
import type { Handlers, RouteConfig } from "@fresh/core";
import { format, parse } from "$std/semver/mod.ts";
import VERSIONS from "../../versions.json" with { type: "json" };
import { extname } from "$std/path/mod.ts";
@@ -17,8 +16,8 @@ const contentTypes = new Map([
]);
export const handler: Handlers = {
async GET(req, ctx) {
const accept = req.headers.get("Accept");
async GET(ctx) {
const accept = ctx.req.headers.get("Accept");
const isHTML = accept?.includes("text/html");
const { version, path } = ctx.params;