import type { PluginFastifyInstance } from "@raclettejs/core"

export const registerCrud = (fastify: PluginFastifyInstance) => {
  const projectService = fastify.custom.projectService

  fastify.registerCrudHandlers("project", {
    create: projectService.createProject,
    read: projectService.readProject,
    update: projectService.updateProject,
    delete: projectService.removeProject,
  })
}
