diff --git a/lib/application.js b/lib/application.js index c722dea..9e0f690 100644 --- a/lib/application.js +++ b/lib/application.js @@ -36,7 +36,16 @@ Application.prototype.getPasswordResetTokens = function(resetToken) { } Application.prototype.createAccount = function(data, callback) { - this.request('POST', ['applications', this.id, 'accounts'], data, callback) + var uri = ['applications', this.id, 'accounts'] + , workflow + + // ugly hack + if (data.registrationWorkflowEnabled !== null) { + workflow = "?registrationWorkflowEnabled=" + data.registrationWorkflowEnabled + uri.push(workflow) + delete data.registrationWorkflowEnabled + } + this.request('POST', uri, data, callback) } Application.prototype.createGroup = function(data, callback) { @@ -112,4 +121,4 @@ Application.prototype.verifyAccount = function(data, callback) { } } -module.exports = Application \ No newline at end of file +module.exports = Application