require('dotenv').config();
const mikrotik = require('./services/mikrotikService');

async function test() {
    console.log("Testing 'monitor-traffic' for vlan_88_PtP_Dell...");
    try {
        // Mikrotik REST API command: POST /rest/interface/monitor-traffic
        // Args: interface (string), once (string/bool?)
        const result = await mikrotik.execute('POST', '/interface/monitor-traffic', {
            interface: 'vlan_88_PtP_Dell',
            once: 'true'
        });

        console.log("Result:", result);
    } catch (error) {
        console.log("Monitor Traffic Failed/Not Supported via REST?");
        console.error(error.message);
        if (error.response) console.log(error.response.data);
    }
}

test();
