import type { PluginFastifyInstance } from "@/types"

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

  fastify.registerCrudHandlers("account", {
    create: accountService.createAccount,
    read: accountService.readAccount,
    update: accountService.updateAccount,
    delete: accountService.removeAccount,
  })
}
