source: trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Remote.pm @ 1570

Last change on this file since 1570 was 1570, checked in by nanardon, 8 years ago

Add Remote/ tree for distant quering

File size: 986 bytes
Line 
1package LATMOS::Accounts::Web::Controller::Remote;
2use Moose;
3use namespace::autoclean;
4
5BEGIN { extends 'Catalyst::Controller'; }
6
7=head1 NAME
8
9LATMOS::Accounts::Web::Controller::Remote - Catalyst Controller
10
11=head1 DESCRIPTION
12
13Catalyst Controller.
14
15=head1 METHODS
16
17=cut
18
19sub 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
33sub index :Path :Args(0) {
34    my ( $self, $c ) = @_;
35
36    $c->response->body('Matched LATMOS::Accounts::Web::Controller::Remote in Remote.');
37}
38
39sub 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
49Olivier Thauvin,Guyancourt - B1428,+33 1 80285052,
50
51=head1 LICENSE
52
53This library is free software. You can redistribute it and/or modify
54it under the same terms as Perl itself.
55
56=cut
57
58__PACKAGE__->meta->make_immutable;
59
601;
Note: See TracBrowser for help on using the repository browser.