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

Mapovani id produktu

parent 60e14d42
No related branches found
No related tags found
No related merge requests found
Checking pipeline status
...@@ -2,7 +2,7 @@ image: docker:20.10.9 ...@@ -2,7 +2,7 @@ image: docker:20.10.9
variables: variables:
DOCKER_TLS_CERTDIR: "/certs" DOCKER_TLS_CERTDIR: "/certs"
IMAGE_VER: 0.10.0 IMAGE_VER: 0.11.0
services: services:
- docker:20.10.9-dind - docker:20.10.9-dind
......
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
pretix_event => 'cf2022', pretix_event => 'cf2022',
pretix_qid_sso => 29, # identifikator otazky SSO UID pretix_qid_sso => 29, # identifikator otazky SSO UID
pretix_qid_region => 8, # identifikator otazky Kraj pretix_qid_region => 8, # identifikator otazky Kraj
pretix_product_member => 1, # produkt pro cleny # pretix_product_member => 1, # produkt pro cleny
pretix_product_regp => 2, # produkt pro regp # pretix_product_regp => 2, # produkt pro regp
mail_domain => 'pirati.cz', mail_domain => 'pirati.cz',
products_map => {split /\D+/, $ENV{CFG_PRODUCTS_MAP}},
} }
...@@ -99,6 +99,8 @@ sub create ($c ) { ...@@ -99,6 +99,8 @@ sub create ($c ) {
} }
} }
$product->{id} = $c->mapped_product_id($product->{id});
push @products, $product; push @products, $product;
} }
......
...@@ -70,6 +70,9 @@ sub register ($class, $self, $conf) { ...@@ -70,6 +70,9 @@ sub register ($class, $self, $conf) {
return $data; return $data;
}); });
$self->helper(mapped_product_id => sub ($c, $id) {
return $c->cfg->{products_map}{$id} // $id;
});
} }
1; 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment