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, []]);
|
||||
}
|
||||
|
||||
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 = {
|
||||
getProducts,
|
||||
getProduct,
|
||||
register,
|
||||
login,
|
||||
verify_mail,
|
||||
checkout
|
||||
checkout,
|
||||
transaction
|
||||
};
|
Loading…
Reference in a new issue