Wroclaw
eebf25198d
also I updated packages, and properly typed api input a lot of time was spent, I don't remeber what really I did x3 but everything was related to replacing mysql2 with prisma
10 lines
395 B
TypeScript
10 lines
395 B
TypeScript
import { defineEventHandler } from "h3";
|
|
|
|
import getPaginatedParameters from "../utils/baaPageParsing";
|
|
import { database } from "../utils/database";
|
|
import { prismaToWeb } from "~/server/utils/prismaToWeb";
|
|
|
|
export default defineEventHandler((e) => {
|
|
const pageParameters = getPaginatedParameters(e, 50, 200);
|
|
return database.client.findPaginated(pageParameters, {}).then(prismaToWeb);
|
|
});
|