diff --git a/server/index.js b/server/index.js index 2db67d8..1c55900 100644 --- a/server/index.js +++ b/server/index.js @@ -11,12 +11,16 @@ import { } from "./api/index.js"; import auth from "./api/auth.js"; import { Parser } from "./parser/index.js"; -import { DSBClient } from "./parser/dsbmobile.js"; +import { BolleClient } from "./parser/bolle.js"; import { parseSubstitutionPlan } from "./parser/untis.js"; -// Check DSB Mobile credentials are supplied -if (!process.env.DSB_USER || !process.env.DSB_PASSWORD) { - console.error("Error: DSB Auth environment variables missing!"); +// Check that credentials are supplied +if ( + !process.env.BOLLE_URL || + !process.env.BOLLE_USER || + !process.env.BOLLE_KEY +) { + console.error("Error: Bolle Auth environment variables missing!"); process.exit(1); } @@ -30,7 +34,11 @@ app.use(express.urlencoded({ extended: true })); // Initialize the Parser and set it to update the // substitution plan at the specified update interval new Parser( - new DSBClient(process.env.DSB_USER, process.env.DSB_PASSWORD), + new BolleClient( + process.env.BOLLE_URL, + process.env.BOLLE_USER, + process.env.BOLLE_KEY + ), parseSubstitutionPlan, process.env.UPDATE_INTERVAL || 1 * 60 * 1000 // Default to 1 minute );