import type { PluginFastifyInstance } from "types"

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

  fastify.registerCrudHandlers("interactionLink", {
    create: interactionLinkService.createInteractionLink,
    read: interactionLinkService.readInteractionLink,
    update: interactionLinkService.updateInteractionLink,
    delete: interactionLinkService.removeInteractionLink,
  })
}
