Skip to content

Commit

Permalink
Fixing option parameters for ProjectMilestones
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalrymple committed Jun 23, 2017
1 parent b4e72f3 commit fe5a5fb
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/Models/ProjectMilestones.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit fe5a5fb

Please sign in to comment.