"ref undefined" error while doing non CORS requests

This fixes the "ref undefined" error in the following line
Line 40: (callback) => @db.apps.checkDomain oauthio.k, ref, callback
of  exports.raw function