Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

added types for database/logs

dominicbachmannec3b94cf9646
diff --git a/src/lib/database/logs.ts b/src/lib/database/logs.ts
index 9a71f51e4c..74f50b50b0 100644
--- a/src/lib/database/logs.ts
+++ b/src/lib/database/logs.ts
@@ -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 } },