feat: trying to add hashes to scripts
This commit is contained in:
@@ -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;
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user