From 4c28a0d0cc1f2d48eebbbf0c4a7c7b73b59ee585 Mon Sep 17 00:00:00 2001 From: Kirill Solomko Date: Tue, 29 Jul 2025 10:06:31 +0200 Subject: [PATCH] MT#63320 /api/vouchers add search by code * search can now be performed by code, where the code is expected to be a base64 encoded string Change-Id: Ic53f28aef1cc676570aec3f346818f717c565bc4 --- lib/NGCP/Panel/Controller/API/Vouchers.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/NGCP/Panel/Controller/API/Vouchers.pm b/lib/NGCP/Panel/Controller/API/Vouchers.pm index ade14c49d1..2485dcbf98 100644 --- a/lib/NGCP/Panel/Controller/API/Vouchers.pm +++ b/lib/NGCP/Panel/Controller/API/Vouchers.pm @@ -42,7 +42,13 @@ sub query_params { }, second => sub {}, }, - }, ]; + }, + { + param => 'code', + description => 'Filter for a voucher with the base64 encoded code', + query_type => 'string_eq', + }, + ], } use parent qw/NGCP::Panel::Role::Entities NGCP::Panel::Role::API::Vouchers/;