diff options
Diffstat (limited to 'core/routes.php')
-rw-r--r-- | core/routes.php | 50 |
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'); |