Rename speedKbps and dataCapMB parameters to bytesPerSecond and quotaBytes, respectively, in API and traffic control logic
This commit is contained in:
@@ -79,10 +79,10 @@ class ApiTester {
|
||||
print(' IP: $peerIP');
|
||||
|
||||
// Test 2: Set speed limit
|
||||
print('\n📋 TEST 2: Set speed limit (500 kbps)');
|
||||
e print('\n📋 TEST 2: Set speed limit (62500 bytes/s = 500 kbps)');
|
||||
final speedResponse = await makeRequest('POST', '/api/peers/speed-limit', {
|
||||
'publicKey': publicKey,
|
||||
'speedKbps': 500,
|
||||
'bytesPerSecond': 62500, // 500 kbps = 500000 bits/s = 62500 bytes/s
|
||||
});
|
||||
|
||||
if (speedResponse['statusCode'] == 200 && speedResponse['body']['success'] == true) {
|
||||
@@ -92,10 +92,10 @@ class ApiTester {
|
||||
}
|
||||
|
||||
// Test 3: Set data cap
|
||||
print('\n📋 TEST 3: Set data cap (1024 MB)');
|
||||
print('\n📋 TEST 3: Set data cap (1073741824 bytes = 1024 MB)');
|
||||
final dataCapResponse = await makeRequest('POST', '/api/peers/data-cap', {
|
||||
'publicKey': publicKey,
|
||||
'dataCapMB': 1024,
|
||||
'quotaBytes': 1073741824, // 1024 * 1024 * 1024 bytes
|
||||
});
|
||||
|
||||
if (dataCapResponse['statusCode'] == 200 && dataCapResponse['body']['success'] == true) {
|
||||
|
||||
Reference in New Issue
Block a user