Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 1c42663

Browse files
committed
Update Project.js
1 parent ca7c865 commit 1c42663

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

modules/Project/Project.js

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -83,32 +83,3 @@ module.controller( 'ProjectForm', ($scope, project) => {
8383
// injected `project` is either a new object or an existing object
8484
$scope.project = project;
8585
});
86-
87-
module.factory('ProjectObject', (BaseObject, $http) => {
88-
class Project extends BaseObject {
89-
static list(userId) {
90-
return $http.get('/api/projects', { params: { user_id: userId } })
91-
.then( (response) => response.data.map( project => new Project(project) ) );
92-
}
93-
94-
static get(id) {
95-
return $http.get(`/api/projects/${id}`)
96-
.then( (response) => new Project(response.data));
97-
}
98-
99-
100-
create() {
101-
return $http.post('/api/projects', this )
102-
.then( (response) => {
103-
this.id = response.data.id;
104-
return response.data;
105-
});
106-
}
107-
108-
update() {
109-
return $http.put(`/api/projects/${this.id}`, this);
110-
}
111-
}
112-
113-
return Project;
114-
});

0 commit comments

Comments
 (0)