WorkshopTasker/server/api/clients.get.ts

12 lines
361 B
TypeScript
Raw Normal View History

import { defineEventHandler, getQuery } from "h3";
import { createError } from "#imports";
2023-05-11 06:03:22 +02:00
2023-05-11 09:11:20 +02:00
import BaaPagination from "~/server/utils/baaPagination";
import { type client } from "~/utils/types/database";
2023-05-11 06:03:22 +02:00
2023-05-11 09:11:20 +02:00
export const baaWrapper = new BaaPagination<client, "id">("clients", "id");
2023-05-11 06:03:22 +02:00
2023-05-11 09:11:20 +02:00
export default defineEventHandler((e) => {
return baaWrapper.RESTget(e);
2023-05-11 06:03:22 +02:00
});