feat: trying to add hashes to scripts

This commit is contained in:
Max Richter
2026-01-10 13:03:13 +01:00
parent e65938ecc2
commit e55f787a29
79 changed files with 4209 additions and 720 deletions

View File

@@ -1,4 +1,3 @@
import { Handlers } from "$fresh/server.ts";
import { createStreamResponse } from "@lib/helpers.ts";
import * as tmdb from "@lib/tmdb.ts";
import {
@@ -8,6 +7,7 @@ import {
import { AccessDeniedError } from "@lib/errors.ts";
import { listResources } from "@lib/marka/index.ts";
import { ReviewResource } from "@lib/marka/schema.ts";
import { define } from "../../../utils.ts";
async function processUpdateRecommendations(
streamResponse: ReturnType<typeof createStreamResponse>,
@@ -53,8 +53,8 @@ async function processUpdateRecommendations(
streamResponse.info("100% Finished");
}
export const handler: Handlers = {
GET(_, ctx) {
export const handler = define.handlers({
GET(ctx) {
const session = ctx.state.session;
if (!session) {
throw new AccessDeniedError();
@@ -65,4 +65,4 @@ export const handler: Handlers = {
return streamResponse.response;
},
};
});

View File

@@ -1,10 +1,10 @@
import { Handlers } from "$fresh/server.ts";
import { AccessDeniedError } from "@lib/errors.ts";
import { getAllRecommendations } from "@lib/recommendation.ts";
import { json } from "@lib/helpers.ts";
import { define } from "../../../utils.ts";
export const handler: Handlers = {
async GET(_, ctx) {
export const handler = define.handlers({
async GET(ctx) {
const session = ctx.state.session;
if (!session) {
throw new AccessDeniedError();
@@ -34,4 +34,4 @@ export const handler: Handlers = {
keywords,
});
},
};
});

View File

@@ -1,10 +1,10 @@
import { Handlers } from "$fresh/server.ts";
import { json } from "@lib/helpers.ts";
import { getAllRecommendations } from "@lib/recommendation.ts";
import { define } from "../../../utils.ts";
export const handler: Handlers = {
export const handler = define.handlers({
async GET() {
const recommendations = await getAllRecommendations();
return json(recommendations);
},
};
});

View File

@@ -1,10 +1,10 @@
import { Handlers } from "$fresh/server.ts";
import { AccessDeniedError } from "@lib/errors.ts";
import { getSimilarMovies } from "@lib/recommendation.ts";
import { json } from "@lib/helpers.ts";
import { define } from "../../../../utils.ts";
export const handler: Handlers = {
async GET(_, ctx) {
export const handler = define.handlers({
async GET(ctx) {
const session = ctx.state.session;
if (!session) {
throw new AccessDeniedError();
@@ -14,4 +14,4 @@ export const handler: Handlers = {
return json(recommendations);
},
};
});