summaryrefslogtreecommitdiffstats
path: root/core/routes.php
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2013-10-04 17:21:52 +0200
committerThomas Tanghus <thomas@tanghus.net>2013-10-04 17:21:52 +0200
commit12bb1970280914309ffca8ca796fcac80663c4cf (patch)
treee5f2dd351f2e31c0a68da3973ce39d62a913d856 /core/routes.php
parentde175a4b0f0971c9cbbf912bbc3fd8cbc190b53d (diff)
downloadnextcloud-server-12bb1970280914309ffca8ca796fcac80663c4cf.tar.gz
nextcloud-server-12bb1970280914309ffca8ca796fcac80663c4cf.zip
JS version of the OCP\ITags interface
Diffstat (limited to 'core/routes.php')
-rw-r--r--core/routes.php50
1 files changed, 37 insertions, 13 deletions
diff --git a/core/routes.php b/core/routes.php
index 57e25c0f1f7..4163bdcd5bc 100644
--- a/core/routes.php
+++ b/core/routes.php
@@ -23,19 +23,43 @@ $this->create('core_ajax_share', '/core/ajax/share.php')
// Translations
$this->create('core_ajax_translations', '/core/ajax/translations.php')
->actionInclude('core/ajax/translations.php');
-// VCategories
-$this->create('core_ajax_vcategories_add', '/core/ajax/vcategories/add.php')
- ->actionInclude('core/ajax/vcategories/add.php');
-$this->create('core_ajax_vcategories_delete', '/core/ajax/vcategories/delete.php')
- ->actionInclude('core/ajax/vcategories/delete.php');
-$this->create('core_ajax_vcategories_addtofavorites', '/core/ajax/vcategories/addToFavorites.php')
- ->actionInclude('core/ajax/vcategories/addToFavorites.php');
-$this->create('core_ajax_vcategories_removefromfavorites', '/core/ajax/vcategories/removeFromFavorites.php')
- ->actionInclude('core/ajax/vcategories/removeFromFavorites.php');
-$this->create('core_ajax_vcategories_favorites', '/core/ajax/vcategories/favorites.php')
- ->actionInclude('core/ajax/vcategories/favorites.php');
-$this->create('core_ajax_vcategories_edit', '/core/ajax/vcategories/edit.php')
- ->actionInclude('core/ajax/vcategories/edit.php');
+// Tags
+$this->create('core_tags_tags', '/tags/{type}')
+ ->get()
+ ->action('OC\Core\Tags\Controller', 'getTags')
+ ->requirements(array('type'));
+$this->create('core_tags_favorites', '/tags/{type}/favorites')
+ ->get()
+ ->action('OC\Core\Tags\Controller', 'getFavorites')
+ ->requirements(array('type'));
+$this->create('core_tags_ids_for_tag', '/tags/{type}/ids')
+ ->get()
+ ->action('OC\Core\Tags\Controller', 'getIdsForTag')
+ ->requirements(array('type'));
+$this->create('core_tags_favorite', '/tags/{type}/favorite/{id}/')
+ ->post()
+ ->action('OC\Core\Tags\Controller', 'favorite')
+ ->requirements(array('type', 'id'));
+$this->create('core_tags_unfavorite', '/tags/{type}/infavorite/{id}/')
+ ->post()
+ ->action('OC\Core\Tags\Controller', 'unFavorite')
+ ->requirements(array('type', 'id'));
+$this->create('core_tags_tag', '/tags/{type}/tag/{id}/')
+ ->post()
+ ->action('OC\Core\Tags\Controller', 'tagAs')
+ ->requirements(array('type', 'id'));
+$this->create('core_tags_untag', '/tags/{type}/untag/{id}/')
+ ->post()
+ ->action('OC\Core\Tags\Controller', 'unTag')
+ ->requirements(array('type', 'id'));
+$this->create('core_tags_add', '/tags/{type}/add')
+ ->post()
+ ->action('OC\Core\Tags\Controller', 'addTag')
+ ->requirements(array('type'));
+$this->create('core_tags_delete', '/tags/{type}/delete')
+ ->post()
+ ->action('OC\Core\Tags\Controller', 'deleteTags')
+ ->requirements(array('type'));
// oC JS config
$this->create('js_config', '/core/js/config.js')
->actionInclude('core/js/config.php');