fix: dont import node:path in clientside components
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user