Skip to content

Commit

Permalink
Use workspace IDs and don't pass objs to asana api
Browse files Browse the repository at this point in the history
  • Loading branch information
limulus committed Jan 14, 2015
1 parent 8d88e1f commit a44e1a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/AsanaTaskReceiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ AsanaTaskReceiver.prototype.configure = function (config) {
AsanaTaskReceiver.prototype.newTask = function (task, cb) {
return this._asanaClient.tasks.create({
"name": task.name(),
"projects": [ {"id": this._config.projectId} ]
"workspace": this._config.workspaceId,
"projects": [ this._config.projectId ]
}).nodeify(function (err, data) {
// if (err) console.log("got", err.value.errors)
return cb(err, task)
}.bind(this))
}
2 changes: 2 additions & 0 deletions test/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ descOrSkip("Asana Integration", function () {
it("should create a new task", function (done) {
taskReceiver.newTask(task, function (err, task) {
assert.ifError(err)
return done()
})
})
})
Expand All @@ -35,6 +36,7 @@ function integrationConfig () {

var envs = {
"ASANA_API_KEY": "apiKey",
"ASANA_WORKSPACE_ID": "workspaceId",
"ASANA_PROJECT_ID": "projectId"
}

Expand Down

0 comments on commit a44e1a7

Please sign in to comment.