import { PluginFastifyInstance } from "types"
import get from "./route.interactionLink.get"
import getAll from "./route.interactionLink.getAll"
import hardDelete from "./route.interactionLink.hardDelete"
import patch from "./route.interactionLink.patch"
import post from "./route.interactionLink.post"
import postBulk from "./route.interactionLink.post.bulk"
import remove from "./route.interactionLink.remove"
import restore from "./route.interactionLink.restore"

const registerRoutes = async (fastify: PluginFastifyInstance) => {
  await fastify.get("/interactionLink/all", getAll(fastify))
  await fastify.get("/interactionLink/:_id", get(fastify))
  await fastify.patch("/interactionLink/:_id", patch(fastify))
  await fastify.patch("/interactionLink/:_id/restore", restore(fastify))
  await fastify.post("/interactionLink", post(fastify))
  await fastify.post("/interactionLink/bulk", postBulk(fastify))
  await fastify.delete("/interactionLink/:_id", remove(fastify))
  await fastify.delete("/interactionLink/:_id/hard", hardDelete(fastify))
}

export default registerRoutes
