mirror of
https://github.com/Expand-sys/ccashfrontend
synced 2025-12-17 15:12:14 +11:00
19 lines
398 B
JavaScript
19 lines
398 B
JavaScript
const got = require("got");
|
|
|
|
async function postUser(name, password) {
|
|
console.log(process.env.BANKAPIURL);
|
|
try {
|
|
const { body } = await got.post(process.env.BANKAPIURL + "BankF/user", {
|
|
json: {
|
|
name: name,
|
|
init_pass: password,
|
|
},
|
|
responseType: "json",
|
|
});
|
|
return body;
|
|
} catch (err) {
|
|
console.log(err);
|
|
}
|
|
}
|
|
|
|
module.exports = { postUser };
|