update
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user