From 176473aa264cc0c353e2a78f0c69f8cb3bc31aa2 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Wed, 23 Oct 2024 13:54:42 +0300 Subject: [PATCH] Rename prefix to vouchers --- internal/handlers/ussd/menuhandler.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/handlers/ussd/menuhandler.go b/internal/handlers/ussd/menuhandler.go index 621a43e..d464ca3 100644 --- a/internal/handlers/ussd/menuhandler.go +++ b/internal/handlers/ussd/menuhandler.go @@ -1068,7 +1068,7 @@ func (h *Handlers) CheckVouchers(ctx context.Context, sym string, input []byte) // process voucher data voucherSymbolList, voucherBalanceList := ProcessVouchers(vouchersResp.Result.Holdings) - prefixdb := storage.NewSubPrefixDb(store, []byte("pfx")) + prefixdb := storage.NewSubPrefixDb(store, []byte("vouchers")) err = prefixdb.Put(ctx, []byte("sym"), []byte(voucherSymbolList)) if err != nil { return res, nil @@ -1108,7 +1108,7 @@ func (h *Handlers) GetVoucherList(ctx context.Context, sym string, input []byte) // Read vouchers from the store store := h.userdataStore - prefixdb := storage.NewSubPrefixDb(store, []byte("pfx")) + prefixdb := storage.NewSubPrefixDb(store, []byte("vouchers")) voucherData, err := prefixdb.Get(ctx, []byte("sym")) if err != nil { @@ -1139,7 +1139,7 @@ func (h *Handlers) ViewVoucher(ctx context.Context, sym string, input []byte) (r return res, nil } - prefixdb := storage.NewSubPrefixDb(store, []byte("pfx")) + prefixdb := storage.NewSubPrefixDb(store, []byte("vouchers")) // Retrieve the voucher symbol list voucherSymbolList, err := prefixdb.Get(ctx, []byte("sym"))