Adding missing controller

This commit is contained in:
Sergiotarxz 2025-01-06 22:16:51 +01:00
parent 9343814279
commit b28d8bca79

View File

@ -0,0 +1,20 @@
package BurguillosInfo::Controller::Product;
use v5.34.1;
use strict;
use warnings;
use BurguillosInfo::Products;
use Data::Dumper;
use Mojo::Base 'Mojolicious::Controller', '-signatures';
sub direct_buy($self) {
my $products = BurguillosInfo::Products->new->Retrieve;
my $slug = $self->param('slug');
$self->redirect_to($products->{$slug}{url});
return;
}
1;