From 0de25799420f38a293ee9acc70eb36e3287145c4 Mon Sep 17 00:00:00 2001 From: Blake Matthes Date: Mon, 11 May 2026 13:35:07 -0500 Subject: [PATCH] fix(scanner): changed to not crash on logging cloases #19 --- backend/mobile/scanLogs.route.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/backend/mobile/scanLogs.route.ts b/backend/mobile/scanLogs.route.ts index 730999d..7214c3a 100644 --- a/backend/mobile/scanLogs.route.ts +++ b/backend/mobile/scanLogs.route.ts @@ -12,14 +12,14 @@ router.post("/", async (req, res) => { const newLog = await db .insert(scanLog) .values({ - scannerId: body.scannerId, - message: body.message, - prompt: body.prompt, - commandDescription: body.commandDescription, - status: body.status, - lines: body.lines, - user: body.user, - runningNumber: body.runningNumber, + scannerId: body.scannerId ?? "", + message: body.message ?? "", + prompt: body.prompt ?? "", + commandDescription: body.commandDescription ?? "", + status: body.status ?? "", + lines: body.lines ?? "", + user: body.user ?? "", + runningNumber: body.runningNumber ?? "", }) .returning();