This commit is contained in:
Matthias Hochmeister
2026-03-13 14:01:06 +01:00
parent 3361f1e28d
commit 7215e7f472
10 changed files with 119 additions and 17 deletions

View File

@@ -197,13 +197,13 @@ router.post(
'/fdisk-sync/trigger',
authenticate,
requirePermission('admin:access'),
async (_req: Request, res: Response): Promise<void> => {
async (req: Request, res: Response): Promise<void> => {
if (!FDISK_SYNC_URL) {
res.status(503).json({ success: false, message: 'FDISK sync service not configured' });
return;
}
try {
const response = await axios.post(`${FDISK_SYNC_URL}/trigger`, {}, { timeout: 5000 });
const response = await axios.post(`${FDISK_SYNC_URL}/trigger`, req.body, { timeout: 5000 });
res.json({ success: true, data: response.data });
} catch (err: unknown) {
if (axios.isAxiosError(err) && err.response?.status === 409) {