diff --git a/server/services/general/utils/mailer.ts b/server/services/general/utils/mailer.ts deleted file mode 100644 index 7829656..0000000 --- a/server/services/general/utils/mailer.ts +++ /dev/null @@ -1,7 +0,0 @@ -import {createLog} from "../../logger/logger.js"; - -export const sendEmail = async () => { - createLog("info", "lst", "general", "Preparing to send an email"); - - // settings -}; diff --git a/server/services/rfid/controller/stations/station3.ts b/server/services/rfid/controller/stations/station3.ts index 7fe0a07..6e94e83 100644 --- a/server/services/rfid/controller/stations/station3.ts +++ b/server/services/rfid/controller/stations/station3.ts @@ -3,9 +3,9 @@ * Phase 2 we will generate a label to be reprinted at staion 4 */ -import {createLog} from "../../../logger/logger.js"; -import type {TagData} from "../tagData.js"; -import {tagStuff} from "../tags/crudTag.js"; +import { createLog } from "../../../logger/logger.js"; +import type { TagData } from "../tagData.js"; +import { tagStuff } from "../tags/crudTag.js"; export const station3Tags = async (tagData: TagData[]) => { // make sure we only have one tag or dont update @@ -17,11 +17,25 @@ export const station3Tags = async (tagData: TagData[]) => { `There are ${tagData.length} tags, and ${tagData[0].reader} only allows 1 tag to create a label.` ); // get tag data - tagStuff(tagData); + + for (let i = 0; i < tagData.length; i++) { + const tag = { + ...tagData[i], + runningNr: 0, + lastareaIn: "NeedsChecked", + }; + tagStuff([tag]); + } } else { //console.log("Generate the label and link it to the tag."); - const tagdata = await tagStuff(tagData); + const tag = { ...tagData[0], runningNr: 0 }; + const tagdata = await tagStuff([tag]); - createLog("info", "rfid", "rfid", "Generate a label and link it to this tag."); + createLog( + "debug", + "rfid", + "rfid", + "Generate a label and link it to this tag." + ); } };