Initial COmmit WIP

This commit is contained in:
Julius Haertl
2016-06-05 15:07:47 +02:00
commit e10fe82afb
55 changed files with 6366 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
app.factory('boardFactory', function($http, stackFactory){
var service = {};
var baseUrl = OC.generateUrl('/apps/deck/boards');
service.getBoards = function(){
return $http.get(baseUrl);
}
service.getBoard = function (id) {
board = $http.get(baseUrl + '/' + id);
return board;
};
service.createBoard = function (board) {
return $http.post(baseUrl, board);
};
service.updateBoard = function (board) {
return $http.put(baseUrl, board)
};
service.deleteBoard = function (id) {
return $http.delete(baseUrl + '/' + id);
};
return service;
});