Skip to content

Adds Getty functionality for badge sign on/ adds date checking - #3

Open
jsiems wants to merge 19 commits into
Devfrom
getty
Open

Adds Getty functionality for badge sign on/ adds date checking#3
jsiems wants to merge 19 commits into
Devfrom
getty

Conversation

@jsiems

@jsiems jsiems commented Jul 22, 2016

Copy link
Copy Markdown
Contributor

Updates program so it also checks for dates when allowing the user to unlock or not
Updates program so user can run it as a command

my $name = $self->param('name');
my $pin = $self->param('pin');
my $remember = $self->param('remember');
my $ip = $self->param('ip');

@jsiems jsiems Jul 22, 2016

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This parameter was never created but never implemented into the program so it needs to be removed, because I found another way to do what I was trying to accomplish and never ended up using it.

Comment thread lib/DoorControl/Command/getty.pm Outdated

if($request->{authorized} == 1 || ($request->{authorized} == 2 && Date_IsWorkDay(ParseDate('now'), 1))) {
my $req = HTTP::Request->new(GET => "http://theofficialjosh.com/test");
my $ua = LWP::UserAgent->new;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use HTTP::Request or LWP::UserAgent when Mojo::UserAgent is already available to you for free.

@s1037989

Copy link
Copy Markdown

This is really good! There's a few things that should really get some attention before merging, but all in all, this is really terrific!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants