feat: refactor whole bunch of stuff
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { Handlers } from "$fresh/server.ts";
|
||||
import { Movie } from "@lib/resource/movies.ts";
|
||||
import { json } from "@lib/helpers.ts";
|
||||
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 { 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) {
|
||||
@@ -50,7 +50,7 @@ export const handler: Handlers = {
|
||||
);
|
||||
}
|
||||
|
||||
const movie: Movie = {
|
||||
const movie: ReviewResource["content"] = {
|
||||
_type: "Review",
|
||||
image: `resources/${finalPath}`,
|
||||
datePublished: releaseDate,
|
||||
|
||||
Reference in New Issue
Block a user