Example #1
0
var seenRequest = function(id, url, date, token, callback) {

    var ms = Date.parse(date),
        props = {
            endpoint: url,
            id: id,
            token: token,
            timestamp: ms
        },
        key = DialbackRequest.toKey(props);

    Step(
        function() {
            DialbackRequest.get(key, this);
        },
        function(err, req) {
            if (err && (err.name == "NoSuchThingError")) {
                callback(null, false);
            } else if (err) {
                callback(err, null);
            } else {
                callback(null, true);
            }
        }
    );
};
Example #2
0
 function() {
     DialbackRequest.get(key, this);
 },
Example #3
0
 function() {
     DialbackRequest.create(props, this);
 },