import { Handlers } from "$fresh/server.ts";
import { getAllMovies } from "@lib/resource/movies.ts";
import { json } from "@lib/helpers.ts";

export const handler: Handlers = {
  async GET() {
    const movies = await getAllMovies();
    return json(movies);
  },
};
