package Daje::Plugin::Login;
use Mojo::Base 'Mojolicious::Plugin', -signatures;
use v5.40;

# NAME
# ====
#
# Daje::Plugin::Login - It's new $module
#
# SYNOPSIS
# ========
#
#     use Daje::Plugin::Login;
#
# DESCRIPTION
# ===========
#
# Daje::Plugin::Login is ...
#
# LICENSE
# =======
#
# Copyright (C) janeskil1525.
#
# This library is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
#
# AUTHOR
# ======
#
# janeskil1525 E<lt>janeskil1525@gmail.comE<gt>
#

use Daje::Helper::Login;

our $VERSION = "0.02";



sub register ($self, $app, $config) {

    my $r = $app->routes();
    $r->put('/api/login/')->to('Login#login_user');

    $app->helper(login => sub {state $login = Daje::Helper::Login->new(pg => $app->pg)});

    $app->log->debug("Daje::Plugin::Login registered");
}

1;
__END__





#################### pod generated by Pod::Autopod - keep this line to make pod updates possible ####################

=head1 NAME


Daje::Plugin::Login - It's new $module



=head1 SYNOPSIS


    use Daje::Plugin::Login;



=head1 DESCRIPTION


Daje::Plugin::Login is ...



=head1 REQUIRES

L<Daje::Helper::Login> 

L<v5.40> 

L<Mojo::Base> 


=head1 METHODS

=head2 register

 register();


=head1 AUTHOR


janeskil1525 E<lt>janeskil1525@gmail.comE<gt>



=head1 LICENSE


Copyright (C) janeskil1525.

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.



=cut

