Skip to content

Commit

Permalink
fix mqtt
Browse files Browse the repository at this point in the history
  • Loading branch information
sebasptsch committed Sep 8, 2024
1 parent 719f6c5 commit cc63db3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ export const env = createEnv({
/** The username to use when connecting to the MQTT broker */
MQTT_USER: z.string().optional(),
/** The password to use when connecting to the MQTT broker */
MQTT_PASSWORD: z.string().optional(),
MQTT_PASS: z.string().optional(),

/** Version */
VERSION: z.string().optional(),
/** The node env */
NODE_ENV: z.enum(["development", "production"]).default("development"),
},
runtimeEnvStrict: {
MQTT_PASSWORD: process.env.MQTT_PASSWORD,
MQTT_PASS: process.env.MQTT_PASS,
MQTT_USER: process.env.MQTT_USER,
MQTT_URL: process.env.MQTT_URL,
POSTGRES_URL: process.env.POSTGRES_URL,
Expand Down
2 changes: 1 addition & 1 deletion src/features/mqtt/mqtt.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class MqttService {
constructor() {
const mqttUrl = env.MQTT_URL;
const mqttUser = env.MQTT_USER;
const mqttPass = env.MQTT_PASSWORD;
const mqttPass = env.MQTT_PASS;

if (!mqttUrl || !mqttUser || !mqttPass) {
this.logger.debug("MQTT not configured, skipping");
Expand Down

0 comments on commit cc63db3

Please sign in to comment.