2023-08-01 17:50:00 +02:00
|
|
|
import { Handlers } from "$fresh/server.ts";
|
|
|
|
import { getMovie } from "@lib/resource/movies.ts";
|
|
|
|
import { json } from "@lib/helpers.ts";
|
|
|
|
|
|
|
|
export const handler: Handlers = {
|
|
|
|
async GET(_, ctx) {
|
|
|
|
const movie = await getMovie(ctx.params.name);
|
|
|
|
return json(movie);
|
|
|
|
},
|
2023-07-30 23:55:51 +02:00
|
|
|
};
|