<reponame>drunkmoses/leaky-repo<filename>web/js/salesforce.js<gh_stars>0let jsforce = require('jsforce');
// Salesforce creds inline in code.

function sfQuery(queryString, success, error){
    let conn = new jsforce.Connection();
    // Security Risk!
    conn.login('upchh@example.com', 'salesforcepassword', function(err, res) {
        if (err) {
            error(err);
            console.error(err);
        }
        conn.query('SELECT Id FROM User', function(err, res) {
            if (err) {
                error(err);
                console.error(err);
            }
            success(res);
        });
    });
}
