feat: refactor whole bunch of stuff
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user