feat: trying to add hashes to scripts
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
import { MainLayout } from "@components/layouts/main.tsx";
|
||||
import { Handlers, PageProps } from "$fresh/server.ts";
|
||||
import { PageProps } from "fresh";
|
||||
import { getPerformances, PerformanceRes } from "@lib/performance.ts";
|
||||
import { AccessDeniedError } from "@lib/errors.ts";
|
||||
import { define } from "../../../utils.ts";
|
||||
|
||||
export const handler: Handlers = {
|
||||
async GET(_, ctx) {
|
||||
export const handler = define.handlers({
|
||||
async GET(ctx) {
|
||||
const performances = await getPerformances();
|
||||
if (!("session" in ctx.state)) {
|
||||
throw new AccessDeniedError();
|
||||
}
|
||||
|
||||
return ctx.render({ performances });
|
||||
return { data: { performances } };
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
function PerformanceLine(
|
||||
{ maximum, data: [amount, min, average, max], url }: {
|
||||
|
||||
Reference in New Issue
Block a user