Skip to content

Commit

Permalink
Merge pull request #21 from nulab/unused-params
Browse files Browse the repository at this point in the history
Fix wrong path and params #20
  • Loading branch information
mmktomato authored Nov 25, 2020
2 parents a9a9ff6 + 9379c05 commit 2d161ff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions dist/backlog.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ var Backlog = (function (_super) {
return this.get("groups/" + groupId);
};
Backlog.prototype.patchGroup = function (groupId, params) {
return this.patch('groups', params);
return this.patch("groups/" + groupId, params);
};
Backlog.prototype.deleteGroup = function (groupId) {
return this.delete("groups/" + groupId);
Expand Down Expand Up @@ -197,11 +197,11 @@ var Backlog = (function (_super) {
Backlog.prototype.patchCustomFieldItem = function (projectIdOrKey, id, itemId, params) {
return this.patch("projects/" + projectIdOrKey + "/customFields/" + id + "/items/" + itemId, params);
};
Backlog.prototype.deleteCustomFieldItem = function (projectIdOrKey, id, params) {
return this.delete("projects/" + projectIdOrKey + "/customFields/" + id + "/items");
Backlog.prototype.deleteCustomFieldItem = function (projectIdOrKey, id, itemId) {
return this.delete("projects/" + projectIdOrKey + "/customFields/" + id + "/items/" + itemId);
};
Backlog.prototype.getSharedFiles = function (projectIdOrKey, path, params) {
return this.get("projects/" + projectIdOrKey + "/files/metadata/" + path);
return this.get("projects/" + projectIdOrKey + "/files/metadata/" + path, params);
};
Backlog.prototype.getSharedFile = function (projectIdOrKey, sharedFileId) {
return this.download("projects/" + projectIdOrKey + "/files/" + sharedFileId);
Expand Down
2 changes: 1 addition & 1 deletion dist/backlog.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/backlog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export default class Backlog extends Request {
public patchGroup(
groupId: number, params: Option.Group.PatchGroupParams
): Promise<any> {
return this.patch('groups', params);
return this.patch(`groups/${groupId}`, params);
}

/**
Expand Down Expand Up @@ -487,9 +487,9 @@ export default class Backlog extends Request {
* 60: https://developer.nulab-inc.com/ja/docs/backlog/api/2/delete-list-item-for-list-type-custom-field/
*/
public deleteCustomFieldItem(
projectIdOrKey: string, id: number, params: Option.Project.PostCustomFieldItemParams
projectIdOrKey: string, id: number, itemId: number
): Promise<any> {
return this.delete(`projects/${projectIdOrKey}/customFields/${id}/items`);
return this.delete(`projects/${projectIdOrKey}/customFields/${id}/items/${itemId}`);
}

/**
Expand All @@ -498,7 +498,7 @@ export default class Backlog extends Request {
public getSharedFiles(
projectIdOrKey: string, path: string, params: Option.Project.GetSharedFilesParams
): Promise<any> {
return this.get(`projects/${projectIdOrKey}/files/metadata/${path}`);
return this.get(`projects/${projectIdOrKey}/files/metadata/${path}`, params);
}

/**
Expand Down

0 comments on commit 2d161ff

Please sign in to comment.