File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 66 * LICENSE file in the root directory.
77 */
88
9- const Http = require ( '../http/http ' )
9+ const ApiRequest = require ( '../request/api ' )
1010
1111const ProjectDataClass = require ( '../../classes/project-data' )
1212
1313const Params = require ( '../../util/params' )
1414
15+ const { PROJECT_DATA_API_PREFIX } = require ( '../../config/config' )
16+
1517class ProjectData {
1618 /**
1719 * @param {Object } payload
@@ -22,9 +24,9 @@ class ProjectData {
2224 const projectId = Params . destructURLParam ( payload , 'projectId' )
2325
2426 const options = {
25- endpoint : `${ ProjectData . API_PREFIX } /project-data/${ projectId } `
27+ endpoint : `${ PROJECT_DATA_API_PREFIX } /project-data/${ projectId } `
2628 }
27- return Http . authorizedRequest ( options )
29+ return ApiRequest . authorizedRequest ( options )
2830 . then ( ( projectDataJson ) => new ProjectDataClass ( projectDataJson ) )
2931 }
3032
@@ -39,13 +41,11 @@ class ProjectData {
3941
4042 const options = {
4143 method : 'PATCH' ,
42- endpoint : `${ ProjectData . API_PREFIX } /project-data/${ projectId } ` ,
44+ endpoint : `${ PROJECT_DATA_API_PREFIX } /project-data/${ projectId } ` ,
4345 body
4446 }
45- return Http . authorizedRequest ( options )
47+ return ApiRequest . authorizedRequest ( options )
4648 }
4749}
4850
49- ProjectData . API_PREFIX = '/api/v5'
50-
5151module . exports = ProjectData
You can’t perform that action at this time.
0 commit comments