mirror of
https://gitlab.com/nekoya/web.git
synced 2024-11-14 02:16:19 +01:00
Add controllers for transaction
This commit is contained in:
parent
030570f10a
commit
bef3abde74
1 changed files with 14 additions and 1 deletions
|
@ -124,11 +124,24 @@ function checkout(
|
||||||
.catch((error) => [error.status, []]);
|
.catch((error) => [error.status, []]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function transaction(key) {
|
||||||
|
const conf = {
|
||||||
|
params: {
|
||||||
|
key: key,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return axios
|
||||||
|
.post(HOST + "/transaction", null, conf)
|
||||||
|
.then((response) => [response.status, response.data])
|
||||||
|
.catch((error) => [error.status, []]);
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
getProducts,
|
getProducts,
|
||||||
getProduct,
|
getProduct,
|
||||||
register,
|
register,
|
||||||
login,
|
login,
|
||||||
verify_mail,
|
verify_mail,
|
||||||
checkout
|
checkout,
|
||||||
|
transaction
|
||||||
};
|
};
|
Loading…
Reference in a new issue