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 } }, where: { buildId, time: { gt: sequence } },
orderBy: { time: 'asc' } orderBy: { time: 'asc' }
}); });
const { status } = await db.prisma.build.findFirst({ where: { id: buildId } }); const data = await db.prisma.build.findFirst({ where: { id: buildId } });
return { return {
body: { body: {
logs, logs,
status status: data?.status || 'running'
} }
}; };
} catch (error) { } catch (error) {