blob: 50396bf18921b6c9900fb1ce1473a35c1112c1b3 [file] [log] [blame]
Nils Diewald1eba6572014-06-17 19:49:53 +00001package Korap::Info;
2use Mojo::Base 'Mojolicious::Controller';
3
4sub about_match {
5 my $c = shift;
Nils Diewald1eba6572014-06-17 19:49:53 +00006
Nils Diewald4af3f0b2014-06-25 01:43:17 +00007 my $corpus_id = $c->stash('corpus_id');
8 my $doc_id = $c->stash('doc_id');
9 my $match_id = $c->stash('match_id');
10
11 return $c->respond_to(
12 json => sub {
13 $c->render(json => $c->notifications(json => $c->match_info($corpus_id, $doc_id, $match_id)))
14 },
15 html => sub {
16 $c->render(
17 layout => 'default',
18 template => 'match_info',
19 match => $c->match_info($corpus_id, $doc_id, $match_id, foundry => '')
20 )
21 }
22 );
Nils Diewald1eba6572014-06-17 19:49:53 +000023};
24
251;
26
27__END__