SpaceNinjaServer/src/controllers/custom/webuiFileChangeDetectedController.ts
Sainan a75e6d6b95
All checks were successful
Build / build (push) Successful in 51s
Build Docker image / docker-amd64 (push) Successful in 52s
Build Docker image / docker-arm64 (push) Successful in 47s
chore: add warning coverage for cyclic includes (#2407)
and some initial refactoring to avoid it where possible

Reviewed-on: #2407
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
2025-07-04 16:49:25 -07:00

11 lines
380 B
TypeScript

import { args } from "@/src/helpers/commandLineArguments";
import { sendWsBroadcast } from "@/src/services/wsService";
import { RequestHandler } from "express";
export const webuiFileChangeDetectedController: RequestHandler = (req, res) => {
if (args.dev && args.secret && req.query.secret == args.secret) {
sendWsBroadcast({ reload: true });
}
res.end();
};