import { PluginFastifyInstance } from "types"
import get from "./route.project.get"
import getAll from "./route.project.getAll"
import patch from "./route.project.patch"
import post from "./route.project.post"
//import hardDelete from "./route.project.hardDelete"
//import remove from "./route.project.remove"

const registerRoutes = async (fastify: PluginFastifyInstance) => {
  await fastify.get("/project/all", getAll(fastify))
  await fastify.get("/project/:_id", get(fastify))

  await fastify.post("/project", post(fastify))
  await fastify.patch("/project/:_id", patch(fastify))
  // TODO reenable once we have deletion concept and space datatype implemented
  //await fastify.delete("/project/:_id", remove(fastify))
  //await fastify.delete("/project/:_id/hard", hardDelete(fastify))
}

export default registerRoutes
