From fe5a5fbb8d01fb670b7c7b14ce2c5b7f30d71fe5 Mon Sep 17 00:00:00 2001 From: Justin Dalrymple Date: Fri, 23 Jun 2017 12:04:59 -0400 Subject: [PATCH] Fixing option parameters for ProjectMilestones --- src/Models/ProjectMilestones.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Models/ProjectMilestones.js b/src/Models/ProjectMilestones.js index d8d56b92e..0ba51ba8d 100644 --- a/src/Models/ProjectMilestones.js +++ b/src/Models/ProjectMilestones.js @@ -6,11 +6,6 @@ class ProjectMilestones extends BaseModel { super(...args); } - list(projectId) { - console.log('DEPRECATED: milestone.list. Use milestone.all instead'); - return this.all(...arguments); - } - all(projectId, options = {}) { options.page = options.page || 1; options.per_page = options.per_page || 100; @@ -22,7 +17,7 @@ class ProjectMilestones extends BaseModel { return this.get(`projects/${Utils.parse(projectId)}/milestones/${parseInt(milestoneId)}`); } - add(projectId, title, description, due_date) { + add(projectId, title, { description, due_date }) { return this.post(`projects/${Utils.parse(projectId)}/milestones`, { id: Utils.parse(projectId), title, @@ -31,7 +26,7 @@ class ProjectMilestones extends BaseModel { }); } - update(projectId, milestoneId, title, description, due_date, state_event) { + update(projectId, milestoneId, { title, description, due_date, state_event }) { return this.put(`projects/${Utils.parse(projectId)}/milestones/${parseInt(milestoneId)}`, { id: Utils.parse(projectId), title,