14 lines
312 B
TypeScript
Raw Normal View History

import { prisma, ErrorHandler } from './common';
2022-02-10 15:47:44 +01:00
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 ErrorHandler(error);
2022-02-10 15:47:44 +01:00
}
}