functional

This commit is contained in:
nannal
2021-05-30 01:11:38 +03:00
parent 1ffe5d8f0f
commit b161f0892e
10 changed files with 350 additions and 0 deletions

21
utils/accountPrice.js Normal file
View File

@@ -0,0 +1,21 @@
fetch = require("node-fetch")
config = require("../config.js")
function accountPrice(username){
return new Promise((resolve, reject) => {
fetch(config.avalonNode+"accountPrice/"+username, {
method: 'get',
headers: {
'Accept': 'application/json, text/plain, */*',
'Content-Type': 'application/json'
}
}).then(res => {
resolve(res.text())
}).catch(function(error) {
reject(error)
})
})
}
module.exports = accountPrice