Skip to content

Commit

Permalink
remove Mojo::JSON lib
Browse files Browse the repository at this point in the history
  • Loading branch information
htrgouvea committed Dec 25, 2024
1 parent 622c1a2 commit a56d541
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cpanfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
requires "Getopt::Long", "2.54";
requires "Mojo::UserAgent";
requires "Mojo::JSON";
requires "JSON";
requires "DateTime";
requires "DateTime::Format::ISO8601";

Expand Down
4 changes: 2 additions & 2 deletions lib/Sentra/Engine/SlackWebhook.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package Sentra::Engine::SlackWebhook {
use strict;
use warnings;
use Mojo::UserAgent;
use Mojo::JSON qw(encode_json);
use JSON;

sub new {
my ($class, $message, $webhook) = @_;

my $userAgent = Mojo::UserAgent -> new();
my $payload = encode_json({text => $message});
my $payload = encode_json({ text => $message });

my $text = $userAgent -> post($webhook => {
'Content-Type' => 'application/json'
Expand Down

0 comments on commit a56d541

Please sign in to comment.