feat: refactor whole bunch of stuff

This commit is contained in:
Max Richter
2025-11-02 19:03:11 +01:00
parent 81ebc8f5e0
commit e6b90cb785
56 changed files with 753 additions and 360 deletions

View File

@@ -4,8 +4,8 @@ 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 { Series } from "@lib/resource/series.ts";
import { createResource, fetchResource } from "@lib/marka.ts";
import { createResource, fetchResource } from "@lib/marka/index.ts";
import { ReviewResource } from "@lib/marka/schema.ts";
export const handler: Handlers = {
async GET(_, ctx) {
@@ -49,7 +49,7 @@ export const handler: Handlers = {
);
}
const series: Series = {
const series: ReviewResource["content"] = {
_type: "Review",
image: `resources/${finalPath}`,
datePublished: releaseDate,

View File

@@ -9,7 +9,7 @@ import {
BadRequestError,
NotFoundError,
} from "@lib/errors.ts";
import { createResource, fetchResource } from "@lib/marka.ts";
import { createResource, fetchResource } from "@lib/marka/index.ts";
const isString = (input: string | undefined): input is string => {
return typeof input === "string";

View File

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