SpaceNinjaServer/src/controllers/api/hubController.ts
Sainan ed596aa3f3 chore: respond to hub request with reflexive address (#2736)
Reviewed-on: OpenWF/SpaceNinjaServer#2736
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
2025-09-01 20:30:03 -07:00

8 lines
274 B
TypeScript

import type { RequestHandler } from "express";
import { getReflexiveAddress } from "../../services/configService.ts";
export const hubController: RequestHandler = (req, res) => {
const { myAddress } = getReflexiveAddress(req);
res.json(`hub ${myAddress}:6952`);
};