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

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

  fastify.registerCrudHandlers("workSession", {
    create: workSessionService.createWorkSession,
    read: workSessionService.readWorkSession,
    update: workSessionService.updateWorkSession,
    delete: workSessionService.removeWorkSession,
  })
}
