Last change
on this file since 1584 was
1570,
checked in by nanardon, 9 years ago
|
Add Remote/ tree for distant quering
|
File size:
986 bytes
|
Rev | Line | |
---|
[1570] | 1 | package LATMOS::Accounts::Web::Controller::Remote; |
---|
| 2 | use Moose; |
---|
| 3 | use namespace::autoclean; |
---|
| 4 | |
---|
| 5 | BEGIN { extends 'Catalyst::Controller'; } |
---|
| 6 | |
---|
| 7 | =head1 NAME |
---|
| 8 | |
---|
| 9 | LATMOS::Accounts::Web::Controller::Remote - Catalyst Controller |
---|
| 10 | |
---|
| 11 | =head1 DESCRIPTION |
---|
| 12 | |
---|
| 13 | Catalyst Controller. |
---|
| 14 | |
---|
| 15 | =head1 METHODS |
---|
| 16 | |
---|
| 17 | =cut |
---|
| 18 | |
---|
| 19 | sub begin { |
---|
| 20 | my ( $self, $c ) = @_; |
---|
| 21 | |
---|
| 22 | if ($c->user_exists) { |
---|
| 23 | # Set login user: |
---|
| 24 | $c->model('Accounts')->db->{_user} = |
---|
| 25 | $c->user->{username}; |
---|
| 26 | } |
---|
| 27 | } |
---|
| 28 | |
---|
| 29 | =head2 index |
---|
| 30 | |
---|
| 31 | =cut |
---|
| 32 | |
---|
| 33 | sub index :Path :Args(0) { |
---|
| 34 | my ( $self, $c ) = @_; |
---|
| 35 | |
---|
| 36 | $c->response->body('Matched LATMOS::Accounts::Web::Controller::Remote in Remote.'); |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | sub end : Private { |
---|
| 40 | my ( $self, $c ) = @_; |
---|
| 41 | $c->stash->{data} ||= {}; |
---|
| 42 | $c->forward($c->view('Json')); |
---|
| 43 | } |
---|
| 44 | |
---|
| 45 | =encoding utf8 |
---|
| 46 | |
---|
| 47 | =head1 AUTHOR |
---|
| 48 | |
---|
| 49 | Olivier Thauvin,Guyancourt - B1428,+33 1 80285052, |
---|
| 50 | |
---|
| 51 | =head1 LICENSE |
---|
| 52 | |
---|
| 53 | This library is free software. You can redistribute it and/or modify |
---|
| 54 | it under the same terms as Perl itself. |
---|
| 55 | |
---|
| 56 | =cut |
---|
| 57 | |
---|
| 58 | __PACKAGE__->meta->make_immutable; |
---|
| 59 | |
---|
| 60 | 1; |
---|
Note: See
TracBrowser
for help on using the repository browser.