Controller/ToolsObjectTypes.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 23 CC 1 SCAR 6.9
CC
1
Cov
0%
load_object_types
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Daje::Controller::ToolsObjectTypes;
2 use Mojo::Base 'Mojolicious::Controller', -signatures;
3 use v5.40;
4  
5 # NAME
6 # ====
7 #
8 # Daje::Controller::Tools - Mojolicious Plugin
9 #
10 # SYNOPSIS
11 # ========
12 #
13 #
14 #
15 # DESCRIPTION
16 # ===========
17 #
18 # Daje::Controller::Tools is a Mojolicious plugin.
19 #
20 # METHODS
21 # =======
22 #
23 # Register plugin in L<Mojolicious> application.
24 #
25 # LICENSE
26 # =======
27 #
28 # Copyright (C) janeskil1525.
29 #
30 # This library is free software; you can redistribute it and/or modify
31 # it under the same terms as Perl itself.
32 #
33 # AUTHOR
34 # ======
35 #
36 # janeskil1525 E<lt>janeskil1525@gmail.com
37 #
38  
39 use Data::Dumper;
40  
41 sub load_object_types ($self) {
42  
43 $self->app->log->debug('Daje::Controller::ToolsObjectTypes::load_objects');
44 $self->render_later;
45 # my ($companies_pkey, $users_pkey) = $self->jwt->companies_users_pkey(
46 # $self->req->headers->header('X-Token-Check')
47 # );
48  
49 $self->app->log->debug($self->req->headers->header('X-Token-Check'));
50 # my $setting = $self->param('setting');
51 $self->tools_object_types->load_full_list_p()->then(sub($result) {
52 $self->render(json => $result->{data});
53 })->catch(sub($err) {
54 $self->render(json => { 'result' => 0, data => $err });
55 })->wait;
56 }
57  
58  
59  
60 1;
61  
62 #################### pod generated by Pod::Autopod - keep this line to make pod updates possible ####################
63  
64 =head1 NAME
65  
66  
67 Daje::Controller::Tools - Mojolicious Plugin
68  
69  
70  
71 =head1 SYNOPSIS
72  
73  
74  
75  
76  
77  
78 =head1 DESCRIPTION
79  
80  
81 Daje::Controller::Tools is a Mojolicious plugin.
82  
83  
84  
85 =head1 REQUIRES
86  
87 L<Data::Dumper>
88  
89 L<v5.40>
90  
91 L<Mojo::Base>
92  
93  
94 =head1 METHODS
95  
96  
97 Register plugin in L<Mojolicious> application.
98  
99  
100  
101 =head1 AUTHOR
102  
103  
104 janeskil1525 E<lt>janeskil1525@gmail.com
105  
106  
107  
108 =head1 LICENSE
109  
110  
111 Copyright (C) janeskil1525.
112  
113 This library is free software; you can redistribute it and/or modify
114 it under the same terms as Perl itself.
115  
116  
117  
118 =cut
119