Move getBaseUrl

This commit is contained in:
Eelco Dolstra
2015-11-17 11:03:05 +01:00
parent dddb9a281d
commit ea80a75204
2 changed files with 12 additions and 9 deletions

View File

@ -1,13 +1,14 @@
package Hydra::Helper::Email;
use strict;
use Exporter 'import';
use Email::Sender::Simple qw(sendmail);
use Email::MIME;
use Email::Sender::Simple qw(sendmail);
use Exporter 'import';
use File::Slurp;
use Hydra::Helper::Nix;
use Sys::Hostname::Long;
our @EXPORT = qw(sendEmail getBaseUrl);
our @EXPORT = qw(sendEmail);
sub sendEmail {
my ($config, $to, $subject, $body, $extraHeaders) = @_;
@ -41,9 +42,4 @@ sub sendEmail {
}
}
sub getBaseUrl {
my ($config) = @_;
return $config->{'base_uri'} // "http://" . hostname_long . ":3000";
}
1;