Created
February 14, 2011 15:07
-
-
Save jegade/825994 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Routes | |
my $r = $self->routes; | |
# Default-Route | |
my $root = $r->bridge('/')->to('root#auth'); | |
# Auth-Vorgang | |
$root->route('/login')->to('auth#login'); | |
$root->route('/dologin')->to('auth#dologin'); | |
$root->route('/logout')->to('auth#logout'); | |
$root->route('/')->to('root#index'); | |
# List View | |
$root->route('/search')->to('search#list'); | |
$root->route('/stats')->to('search#stats'); | |
# Translation with Session-Auth | |
my $translate = $root->bridge('/translate/(.reference)')->to('translate#load'); | |
$translate->route('/view')->to('translate#view'); | |
$translate->route('/update')->to('translate#update'); | |
# API with Token-Auth | |
my $api = $r->bridge('/api')->to('api#auth'); | |
$api->route('/update')->to('api#update'); | |
$api->route('/get')->to('api#get'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment