Just v2
This commit is contained in:
Andras Bacsai
2022-02-10 15:47:44 +01:00
committed by GitHub
parent a64b095c13
commit 460ae85226
403 changed files with 22039 additions and 12465 deletions

13
src/lib/database/logs.ts Normal file
View File

@@ -0,0 +1,13 @@
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 (e) {
throw PrismaErrorHandler(e);
}
}