mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-01-25 16:04:01 +00:00
ProjectIssueNotes tweaks
This commit is contained in:
parent
e5f354d6af
commit
94945cb2cf
@ -8,6 +8,9 @@ class BaseModel {
|
||||
}
|
||||
|
||||
post(endpoint, options){
|
||||
console.log(endpoint)
|
||||
console.log(options)
|
||||
|
||||
return this.client.post(endpoint, options);
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
const BaseModel = require('../BaseModel');
|
||||
const Utils = require('../Utils');
|
||||
|
||||
class ProjectNotes extends BaseModel {
|
||||
class ProjectIssueNotes extends BaseModel {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
}
|
||||
@ -16,6 +16,8 @@ class ProjectNotes extends BaseModel {
|
||||
create(projectId, issueId, options = {}) {
|
||||
if(!options.body) throw new Error('Missing required property: body');
|
||||
|
||||
console.log(this.post)
|
||||
|
||||
return this.post(`projects/${Utils.parse(projectId)}/issues/${parseInt(issueId)}/notes`, options);
|
||||
}
|
||||
|
||||
@ -46,4 +48,4 @@ class ProjectNotes extends BaseModel {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ProjectNotes;
|
||||
module.exports = ProjectIssueNotes;
|
||||
|
||||
@ -5,7 +5,8 @@ const ProjectIssueNotes = require('./ProjectIssueNotes');
|
||||
class ProjectIssues extends BaseModel {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
this.notes = ProjectIssueNotes;
|
||||
|
||||
this.notes = new ProjectIssueNotes(...args);
|
||||
}
|
||||
|
||||
all(projectId, options = {}) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user