smart_ims/server/test_sync.js

20 lines
644 B
JavaScript

const axios = require('axios');
async function test() {
const licenseManagerUrl = 'http://localhost:3006/api';
const licenseKey = 'test-key';
try {
console.log(`📡 Testing sync with ${licenseManagerUrl}/licenses/activate`);
const response = await axios.post(`${licenseManagerUrl}/licenses/activate`, { licenseKey });
console.log('✅ Success:', response.data);
} catch (err) {
if (err.response) {
console.error('❌ Error Response:', err.response.status, err.response.data);
} else {
console.error('❌ Error Message:', err.message);
}
}
}
test();