Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

charges.list 加了 created gte lte 参数后 响应超时 #6

Open
ryanhex53 opened this issue Sep 6, 2016 · 0 comments
Open

charges.list 加了 created gte lte 参数后 响应超时 #6

ryanhex53 opened this issue Sep 6, 2016 · 0 comments

Comments

@ryanhex53
Copy link

最后这个 callback 貌似不会被调用

var query = {};
    if (req.query.limit)
        query.limit = req.query.limit;
    if (req.query.created_gte)
        query.created = {gte: Math.round(app_util.parseDate(req.query.created_gte).getTime() / 1000)};
    if (req.query.created_lte) {
        if (query.created)
            query.created.lte = Math.round(app_util.parseDate(req.query.created_lte).getTime() / 1000);
        else
            query.created = {lte: Math.round(app_util.parseDate(req.query.created_lte).getTime() / 1000)};
    }
    if (req.query.channel)
        query.channel = req.query.channel;
    query.paid = req.query.paid || true;
    query.refunded = req.query.refunded || false;
    pingpp.charges.list(query, function (err, charges) {
        if (!err)
            res.json(charges);
        else
            res.json({success: false, reason: err});
    });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant