fix: dont import node:path in clientside components

This commit is contained in:
Max Richter
2025-10-31 15:41:46 +01:00
parent 7e60327940
commit 79d692c2c6
21 changed files with 68 additions and 67 deletions

View File

@@ -5,7 +5,7 @@ import * as tmdb from "@lib/tmdb.ts";
import { fileExtension } from "https://deno.land/x/file_extension@v2.1.0/mod.ts";
import { isString, safeFileName } from "@lib/string.ts";
import { AccessDeniedError } from "@lib/errors.ts";
import { fetchResource } from "@lib/resources.ts";
import { fetchResource } from "@lib/marka.ts";
export const handler: Handlers = {
async GET(_, ctx) {
@@ -38,9 +38,8 @@ export const handler: Handlers = {
const poster = await tmdb.getMoviePoster(posterPath);
const extension = fileExtension(posterPath);
finalPath = `Media/movies/images/${
safeFileName(name)
}_cover.${extension}`;
finalPath = `Media/movies/images/${safeFileName(name)
}_cover.${extension}`;
await createDocument(finalPath, poster);
}

View File

@@ -9,7 +9,7 @@ import {
NotFoundError,
} from "@lib/errors.ts";
import { createRecommendationResource } from "@lib/recommendation.ts";
import { fetchResource } from "@lib/resources.ts";
import { fetchResource } from "@lib/marka.ts";
const POST = async (
req: Request,

View File

@@ -1,6 +1,6 @@
import { Handlers } from "$fresh/server.ts";
import { json } from "@lib/helpers.ts";
import { fetchResource } from "@lib/resources.ts";
import { fetchResource } from "@lib/marka.ts";
export const handler: Handlers = {
async GET() {