ADB connect now respects auth keys in the settings page.

This commit is contained in:
Simo Kinnunen
2014-10-01 18:41:18 +09:00
parent 0a67c8c272
commit e6c1de5194
12 changed files with 322 additions and 49 deletions

View File

@@ -52,8 +52,20 @@ module.exports = function(conn) {
})
}
function createIndex(table, index, fn) {
return r.table(table).indexCreate(index, fn).run(conn)
function createIndex(table, index, options) {
var args = [index]
, rTable = r.table(table)
if (options) {
if (options.indexFunction) {
args.push(options.indexFunction)
}
if (options.options) {
args.push(options.options)
}
}
return rTable.indexCreate.apply(rTable, args).run(conn)
.then(function() {
log.info('Index "%s"."%s" created', table, index)
})
@@ -63,7 +75,7 @@ module.exports = function(conn) {
})
.catch(noMasterAvailableError, function() {
return Promise.delay(1000).then(function() {
return createIndex(table, index, fn)
return createIndex(table, index, options)
})
})
}