21 lines
613 B
JavaScript
21 lines
613 B
JavaScript
export async function runTest() {
|
|
try {
|
|
const response = await fetch('http://localhost:3000/api/crypto-sweep', {
|
|
method: 'POST',
|
|
headers: { 'Content-Type': 'application/json' },
|
|
body: JSON.stringify({
|
|
txId: 'not-important-since-it-will-catch-in-db',
|
|
network: 'SOLANA',
|
|
token: 'SOL'
|
|
})
|
|
});
|
|
|
|
console.log("Status:", response.status);
|
|
const data = await response.json();
|
|
console.log("Data:", data);
|
|
} catch(e) {
|
|
console.error("Fetch Error:", e);
|
|
}
|
|
}
|
|
runTest();
|