added types for database/logs
This commit is contained in:
parent
c4cb92c78d
commit
ec3b94cf96
@ -1,6 +1,13 @@
|
||||
import type { BuildLog } from '@prisma/client';
|
||||
import { prisma, ErrorHandler } from './common';
|
||||
|
||||
export async function listLogs({ buildId, last = 0 }) {
|
||||
export async function listLogs({
|
||||
buildId,
|
||||
last = 0
|
||||
}: {
|
||||
buildId: string;
|
||||
last: number;
|
||||
}): Promise<BuildLog[] | { status: number; body: { message: string; error: string } }> {
|
||||
try {
|
||||
const body = await prisma.buildLog.findMany({
|
||||
where: { buildId, time: { gt: last } },
|
||||
|
Loading…
x
Reference in New Issue
Block a user