Skip to content
Snippets Groups Projects
Verified Commit 474cedbf authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

Bugfix

parent 0876433f
No related branches found
No related tags found
No related merge requests found
Pipeline #8607 passed
0.2.1 0.2.2
...@@ -43,7 +43,7 @@ sub create ($c) { ...@@ -43,7 +43,7 @@ sub create ($c) {
$shortcut ||= $c->schema->resultset('Shortcut')->create({ $shortcut ||= $c->schema->resultset('Shortcut')->create({
%data, %data,
shortcut => ($custom || $c->schema->resultset('Shortcut')->generate()), shortcut => $c->schema->resultset('Shortcut')->generate($custom),
}); });
$url = 'https://' . $c->config->{domain} . '/' . $shortcut->shortcut; $url = 'https://' . $c->config->{domain} . '/' . $shortcut->shortcut;
......
...@@ -11,6 +11,9 @@ use constant SIZE => 4; ...@@ -11,6 +11,9 @@ use constant SIZE => 4;
sub generate { sub generate {
my $class = shift; my $class = shift;
my $custom = shift;
return $custom if $custom;
my $shortcut; my $shortcut;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment