fix: Status is not available yet

This commit is contained in:
Andras Bacsai 2022-02-10 22:10:02 +01:00
parent 73fc9755dd
commit f514aa676d

View File

@ -14,12 +14,12 @@ export const get: RequestHandler = async (event) => {
where: { buildId, time: { gt: sequence } },
orderBy: { time: 'asc' }
});
const { status } = await db.prisma.build.findFirst({ where: { id: buildId } });
const data = await db.prisma.build.findFirst({ where: { id: buildId } });
return {
body: {
logs,
status
status: data?.status || 'running'
}
};
} catch (error) {