14 lines
324 B
TypeScript
Raw Normal View History

2022-02-10 15:47:44 +01:00
import { prisma, PrismaErrorHandler } from './common';
export async function listLogs({ buildId, last = 0 }) {
try {
const body = await prisma.buildLog.findMany({
where: { buildId, time: { gt: last } },
orderBy: { time: 'asc' }
});
return [...body];
} catch (error) {
return PrismaErrorHandler(error);
2022-02-10 15:47:44 +01:00
}
}