28 lines
477 B
TypeScript
28 lines
477 B
TypeScript
import { PrismaClient } from "@prisma/client";
|
|
const db = new PrismaClient();
|
|
async function a() {
|
|
return await db.job.findMany({
|
|
where: {
|
|
data: {
|
|
pay: {
|
|
gte: 10,
|
|
},
|
|
},
|
|
},
|
|
orderBy: [
|
|
{
|
|
pin: "desc",
|
|
},
|
|
{
|
|
updateTime: "desc",
|
|
},
|
|
],
|
|
include: {
|
|
data: true,
|
|
},
|
|
});
|
|
}
|
|
export default defineEventHandler(async (event) => {
|
|
return await a();
|
|
});
|