fix(mikrotikApplyService): filter routes by comment prefix when removing to ensure accurate route deletion
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m55s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m55s
This commit is contained in:
@@ -270,8 +270,9 @@ async function applyOperation(client, op, dryRun) {
|
||||
|
||||
if (path === '/ip/route') {
|
||||
if (action === 'remove' && meta?.findComment) {
|
||||
const existing = await rosPrintWithQuery(client, '/ip/route', [`~comment=${meta.findComment}`]);
|
||||
const toRemove = existing;
|
||||
// REST API может игнорировать regex в .query и возвращать все маршруты — фильтруем на нашей стороне
|
||||
const raw = await rosPrintWithQuery(client, '/ip/route', [`~comment=${meta.findComment}`]);
|
||||
const toRemove = raw.filter(r => (r.comment || '').startsWith('Recursive: '));
|
||||
if (toRemove.length === 0) {
|
||||
result.status = 'skip';
|
||||
result.details = 'No matching routes to remove';
|
||||
|
||||
Reference in New Issue
Block a user