diff --git a/lstV2/server/services/rfid/route/tagInfo.ts b/lstV2/server/services/rfid/route/tagInfo.ts index 7b21d74..3126888 100644 --- a/lstV2/server/services/rfid/route/tagInfo.ts +++ b/lstV2/server/services/rfid/route/tagInfo.ts @@ -46,9 +46,17 @@ app.openapi( return c.json({ success: false, message: "missing data" }, 400); } //console.log(`Tag: ${Buffer.from(body.idHex, "hex").toString("utf-8")}, ${body[key].data.idHex}`); + createLog( + "info", + "rfid-tag", + "rfid", + `Tag Data from ${reader}: ${JSON.stringify(body)}`, + ); for (let i = 0; i < body.length; i++) { - const tag = Buffer.from(body[i].data.idHex, "hex").toString("utf-8"); + const tag = Buffer.from(body[i].data.idHex, "hex") + .toString("utf-8") + .replace("\x00\x00", ""); // console.log( // "Raw value:", // body[i].data.peakRssi,