Remove payment step #1

Merged
edazdarevic merged 2 commits from remove-payment-step into master 2019-03-06 20:32:34 +01:00
2 changed files with 15 additions and 22 deletions
Showing only changes of commit b7cb61b53b - Show all commits

View File

@@ -49,15 +49,16 @@ app.get("/items/:url", async (req, res) => {
app.post("/marketalerts", function(req, res) {
const { email, last_date, olx_url } = req.body;
console.log(email, last_date, olx_url);
res.json({ message: "Market Alert Created!" });
// sequelize.sync().then(() =>
// MarketAlert.create({
// olx_url,
// last_date,
// email
// })
// );
// res.json({ message: "Market Alert Created!" });
//res.json({ message: "Market Alert Created!" });
sequelize.sync().then(() =>
MarketAlert.create({
olx_url,
last_date,
email
})
res.json({ message: "Market Alert Created!" });
);
//res.json({ message: "Market Alert Created!" });
});
app.post("/payforalert", function(request, response) {

View File

@@ -62,7 +62,7 @@ class NotificationModal extends React.Component {
};
successCallback = data => {
token = data.response.token.token;
//token = data.response.token.token;
const {
userdata: { email, last_date, olx_url }
} = this.props;
@@ -73,18 +73,10 @@ class NotificationModal extends React.Component {
last_date,
olx_url
})
.then(response =>
axios
.post("/payforalert", {
email,
token
})
.then(response => {
this.handleClose();
alert("Market Alert Created");
})
.catch(error => console.log(error))
)
.then(response => {
this.handleClose();
alert("Market Alert Created");
})
.catch(error => console.log(error));
};