From 3ec4bc2557060156032574c8f1ad742f61877e15 Mon Sep 17 00:00:00 2001 From: Dennis Postma Date: Mon, 30 Sep 2024 22:20:07 +0200 Subject: [PATCH] Prod. command fix attempt #2 --- src/commands/alert.ts | 2 +- src/commands/listZones.ts | 2 +- src/commands/tiles.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/alert.ts b/src/commands/alert.ts index 779bbd2..353d098 100644 --- a/src/commands/alert.ts +++ b/src/commands/alert.ts @@ -2,7 +2,7 @@ import { Server } from 'socket.io' type CommandInput = string[] -export default function (input: CommandInput, io: Server) { +module.exports = function (input: CommandInput, io: Server) { const message: string = input.join(' ') ?? null if (!message) return console.log('message is required') io.emit('notification', { message: message }) diff --git a/src/commands/listZones.ts b/src/commands/listZones.ts index 766ca06..5d98aff 100644 --- a/src/commands/listZones.ts +++ b/src/commands/listZones.ts @@ -3,6 +3,6 @@ import ZoneManager from '../managers/zoneManager' type CommandInput = string[] -export default function (input: CommandInput, io: Server) { +module.exports = function (input: CommandInput, io: Server) { console.log(ZoneManager.getLoadedZones()) } diff --git a/src/commands/tiles.ts b/src/commands/tiles.ts index feb317a..36aa9fa 100644 --- a/src/commands/tiles.ts +++ b/src/commands/tiles.ts @@ -3,7 +3,7 @@ import fs from 'fs' import sharp from 'sharp' import { commandLogger } from '../utilities/logger' -export default async function tiles() { +module.exports = async function () { // Get all tiles const tilesDir = path.join(process.cwd(), 'public', 'tiles'); const tiles = fs.readdirSync(tilesDir).filter((file) => file.endsWith('.png'));