不要怂,就是干,撸起袖子干!

Commit 5909e286 by Sascha Depold

formatting

1 parent 8fd3fdc9
Showing with 7 additions and 2 deletions
...@@ -191,9 +191,11 @@ module.exports = (function() { ...@@ -191,9 +191,11 @@ module.exports = (function() {
options = Utils._.extend({}, this.options, options || {}) options = Utils._.extend({}, this.options, options || {})
var self = this var self = this
return new Utils.CustomEventEmitter(function(emitter) { return new Utils.CustomEventEmitter(function(emitter) {
var doQuery = function() { var doQuery = function() {
self.QueryInterface self
.QueryInterface
.createTable(self.getTableName(), self.attributes, options) .createTable(self.getTableName(), self.attributes, options)
.success(function() { emitter.emit('success', self) }) .success(function() { emitter.emit('success', self) })
.error(function(err) { emitter.emit('error', err) }) .error(function(err) { emitter.emit('error', err) })
...@@ -201,7 +203,10 @@ module.exports = (function() { ...@@ -201,7 +203,10 @@ module.exports = (function() {
} }
if (options.force) { if (options.force) {
self.drop(options).success(doQuery).error(function(err) { emitter.emit('error', err) }) self
.drop(options)
.success(doQuery)
.error(function(err) { emitter.emit('error', err) })
} else { } else {
doQuery() doQuery()
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!