SpaceNinjaServer/src/controllers/custom/webuiFileChangeDetectedController.ts
Sainan f84cc54c97
All checks were successful
Build / build (push) Successful in 48s
Build Docker image / docker-amd64 (push) Successful in 54s
Build Docker image / docker-arm64 (push) Successful in 58s
chore: use build & start process for development as well (#2222)
Reviewed-on: #2222
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
2025-06-20 18:30:52 -07:00

12 lines
481 B
TypeScript

import { args } from "@/src/helpers/commandLineArguments";
import { config } from "@/src/services/configService";
import { sendWsBroadcast } from "@/src/services/webService";
import { RequestHandler } from "express";
export const webuiFileChangeDetectedController: RequestHandler = (req, res) => {
if (args.dev && args.secret && req.query.secret == args.secret) {
sendWsBroadcast({ ports: { http: config.httpPort, https: config.httpsPort } });
}
res.end();
};