feat: trying to add hashes to scripts
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { FreshContext, Handlers } from "$fresh/server.ts";
|
||||
import { getImageContent } from "@lib/image.ts";
|
||||
import { createLogger } from "@lib/log/index.ts";
|
||||
import { Context } from "fresh";
|
||||
|
||||
const log = createLogger("api/image");
|
||||
|
||||
@@ -69,9 +69,9 @@ async function generateETag(content: Uint8Array<ArrayBuffer>): Promise<string> {
|
||||
}"`;
|
||||
}
|
||||
|
||||
async function GET(req: Request, _ctx: FreshContext): Promise<Response> {
|
||||
async function GET(ctx: Context<unknown>): Promise<Response> {
|
||||
try {
|
||||
const url = new URL(req.url);
|
||||
const url = new URL(ctx.req.url);
|
||||
const params = parseParams(url);
|
||||
|
||||
if (typeof params === "string") {
|
||||
@@ -106,6 +106,6 @@ async function GET(req: Request, _ctx: FreshContext): Promise<Response> {
|
||||
}
|
||||
}
|
||||
|
||||
export const handler: Handlers = {
|
||||
export const handler = {
|
||||
GET,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user