TradeGame/client/Public/script.js
2020-12-30 17:48:33 +02:00

20 lines
394 B
JavaScript

async function send(userID, asset){
data={
userID: userID,
asset: asset
}
let response = await fetch('/submit', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=utf-8'
},
body: JSON.stringify(data)
})
let result = await response.json();
console.log(response.json)
document.getElementById("input").innerHTML=result.text
}