feat: trying to add hashes to scripts
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import { Handlers } from "$fresh/server.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 {
|
||||
fileExtension,
|
||||
formatDate,
|
||||
isString,
|
||||
safeFileName,
|
||||
@@ -11,13 +10,14 @@ import {
|
||||
import { AccessDeniedError, BadRequestError } from "@lib/errors.ts";
|
||||
import { createResource, fetchResource } from "@lib/marka/index.ts";
|
||||
import { ReviewResource } from "@lib/marka/schema.ts";
|
||||
import { define } from "../../../utils.ts";
|
||||
|
||||
export const handler: Handlers = {
|
||||
async GET(_, ctx) {
|
||||
export const handler = define.handlers({
|
||||
async GET(ctx) {
|
||||
const movie = await fetchResource(`movies/${ctx.params.name}`);
|
||||
return json(movie?.content);
|
||||
},
|
||||
async POST(_, ctx) {
|
||||
async POST(ctx) {
|
||||
const session = ctx.state.session;
|
||||
if (!session) throw new AccessDeniedError();
|
||||
|
||||
@@ -70,4 +70,4 @@ export const handler: Handlers = {
|
||||
|
||||
return json({ name: fileName });
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user