import { FastifyReply, FastifyRequest } from "fastify";
import prisma from "../../utils/prisma";

export async function getVideos(req: FastifyRequest, reply: FastifyReply) {
  const videos = await prisma.video.findMany({
    orderBy: {
      date: "desc",
    },
  });

  return reply.code(200).send(videos);
}
