| 1 | package Daje::Controller::Languages::Translations; | ||
| 2 | use Mojo::Base 'Mojolicious::Controller', -base, -signatures; | ||
| 3 | use v5.42; | ||
| 4 | |||
| 5 | # NAME | ||
| 6 | # ==== | ||
| 7 | # | ||
| 8 | # Daje::Controller::Languages::LanguagesLan - Controller class | ||
| 9 | # | ||
| 10 | # SYNOPSIS | ||
| 11 | # ======== | ||
| 12 | # | ||
| 13 | # use Daje::Controller::Languages::LanguagesLan | ||
| 14 | # | ||
| 15 | # | ||
| 16 | # | ||
| 17 | # DESCRIPTION | ||
| 18 | # =========== | ||
| 19 | # | ||
| 20 | # Daje::Controller::Languages::LanguagesLan is a standard controller | ||
| 21 | # | ||
| 22 | # METHODS | ||
| 23 | # ======= | ||
| 24 | # | ||
| 25 | # | ||
| 26 | # LICENSE | ||
| 27 | # ======= | ||
| 28 | # | ||
| 29 | # Copyright (C) janeskil1525. | ||
| 30 | # | ||
| 31 | # This library is free software; you can redistribute it and/or modify | ||
| 32 | # it under the same terms as Perl itself. | ||
| 33 | # | ||
| 34 | # AUTHOR | ||
| 35 | # ====== | ||
| 36 | # | ||
| 37 | # janeskil1525 E<lt>janeskil1525@gmail.com | ||
| 38 | # | ||
| 39 | |||
| 40 | # This file is generated automatically by Daje Tools 2026-02-18 15:38:52. | ||
| 41 | # It will not be re-generated by Daje Tools again. | ||
| 42 | # <!-- Autogenerated file 2026-02-18 15:38:52 --> | ||
| 43 | |||
| 44 | use Data::Dumper; | ||
| 45 | |||
| 46 | our $VERSION = '0.01'; | ||
| 47 | |||
| 48 | sub translations_list($self) { | ||
| 49 | |||
| 50 | $self->app->log->debug('Daje::Controller::Languages::Translations::translations Starts'); | ||
| 51 | $self->render_later; | ||
| 52 | my ($companies_pkey, $users_pkey) = $self->jwt->companies_users_pkey( | ||
| 53 | $self->req->headers->header('X-Token-Check') | ||
| 54 | ); | ||
| 55 | # my $plugin = $self->param('plugin'); | ||
| 56 | $self->translations->load_translations_p($users_pkey)->then(sub($result) { | ||
| 57 | $self->render(json => $result->to_array()); | ||
| 58 | })->catch(sub($err) { | ||
| 59 | $self->app->log->error('Daje::Controller::Languages::Translations::translations ' . $err); | ||
| 60 | $self->render | ||
| 61 | }); | ||
| 62 | |||
| 63 | $self->app->log->debug('Daje::Controller::Languages::Translations::translations Ends'); | ||
| 64 | } | ||
| 65 | 1; | ||
| 66 | |||
| 67 | |||
| 68 | |||
| 69 | |||
| 70 | #################### pod generated by Pod::Autopod - keep this line to make pod updates possible #################### | ||
| 71 | |||
| 72 | =head1 NAME | ||
| 73 | |||
| 74 | |||
| 75 | Daje::Controller::Languages::LanguagesLan - Controller class | ||
| 76 | |||
| 77 | |||
| 78 | |||
| 79 | =head1 SYNOPSIS | ||
| 80 | |||
| 81 | |||
| 82 | use Daje::Controller::Languages::LanguagesLan | ||
| 83 | |||
| 84 | |||
| 85 | |||
| 86 | |||
| 87 | |||
| 88 | =head1 DESCRIPTION | ||
| 89 | |||
| 90 | |||
| 91 | Daje::Controller::Languages::LanguagesLan is a standard controller | ||
| 92 | |||
| 93 | |||
| 94 | |||
| 95 | =head1 REQUIRES | ||
| 96 | |||
| 97 | L<v5.42> | ||
| 98 | |||
| 99 | L<Mojo::Base> | ||
| 100 | |||
| 101 | |||
| 102 | =head1 METHODS | ||
| 103 | |||
| 104 | |||
| 105 | |||
| 106 | |||
| 107 | |||
| 108 | =head1 AUTHOR | ||
| 109 | |||
| 110 | |||
| 111 | janeskil1525 E<lt>janeskil1525@gmail.com | ||
| 112 | |||
| 113 | |||
| 114 | |||
| 115 | =head1 LICENSE | ||
| 116 | |||
| 117 | |||
| 118 | Copyright (C) janeskil1525. | ||
| 119 | |||
| 120 | This library is free software; you can redistribute it and/or modify | ||
| 121 | it under the same terms as Perl itself. | ||
| 122 | |||
| 123 | |||
| 124 | |||
| 125 | =cut | ||
| 126 |