summaryrefslogtreecommitdiffstats
path: root/js/app/services/bl/folderbl.coffee
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-04-08 17:56:53 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-04-08 17:56:53 +0200
commitca0864dbcd2b01a31a997c1db28aa241512dcb5f (patch)
treeb6881722220ae3f47bb3d502091d3d0dc736975a /js/app/services/bl/folderbl.coffee
parente6d926de620a470a487010f02b47e3932512db93 (diff)
prework for adding folders
Diffstat (limited to 'js/app/services/bl/folderbl.coffee')
-rw-r--r--js/app/services/bl/folderbl.coffee10
1 files changed, 8 insertions, 2 deletions
diff --git a/js/app/services/bl/folderbl.coffee b/js/app/services/bl/folderbl.coffee
index 6085ca50e..68031371a 100644
--- a/js/app/services/bl/folderbl.coffee
+++ b/js/app/services/bl/folderbl.coffee
@@ -23,9 +23,9 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
angular.module('News').factory 'FolderBl',
['_Bl', 'FolderModel', 'FeedBl', 'Persistence', 'FeedType', 'ActiveFeed',
-'ItemModel', 'ShowAll',
+'ItemModel', 'ShowAll', '_ExistsError',
(_Bl, FolderModel, FeedBl, Persistence, FeedType, ActiveFeed,
-ItemModel, ShowAll)->
+ItemModel, ShowAll, _ExistsError)->
class FolderBl extends _Bl
@@ -81,6 +81,12 @@ ItemModel, ShowAll)->
return @_folderModel.getAll()
+ create: (folderName) ->
+ if @_folderModel.nameExists(folderName)
+ throw new _ExistsError()
+
+
+
return new FolderBl(FolderModel, FeedBl, ShowAll, ActiveFeed, Persistence,
FeedType, ItemModel)