manage vouchers in single function #42

Merged
lash merged 6 commits from manage-vouchers-in-single-function into master 2025-04-01 21:26:28 +02:00
Showing only changes of commit ea0fc4491d - Show all commits

View File

@ -1981,8 +1981,6 @@ func (h *MenuHandlers) ManageVouchers(ctx context.Context, sym string, input []b
res.FlagReset = append(res.FlagReset, flag_no_active_voucher)
logg.InfoCtxf(ctx, "Fetched user vouchers", "public_key", string(publicKey), "vouchers", vouchersResp)
// Check if user has an active voucher with proper error handling
Alfred-mk marked this conversation as resolved
Review

is this log line a bit noisy? it prints the whole voucher response, cluttering the logs. the list perhaps better in debug?

is this log line a bit noisy? it prints the whole voucher response, cluttering the logs. the list perhaps better in debug?
Review

This has been cleaned up. The logs were related to debug

This has been cleaned up. The logs were related to debug
activeSym, err := userStore.ReadEntry(ctx, sessionId, storedb.DATA_ACTIVE_SYM)
if err != nil {
@ -2058,7 +2056,6 @@ func (h *MenuHandlers) ManageVouchers(ctx context.Context, sym string, input []b
// Write data entries
for key, value := range dataMap {
logg.InfoCtxf(ctx, "Writing data entry for sessionId: %s", sessionId, "key", key, "value", value)
if err := userStore.WriteEntry(ctx, sessionId, key, []byte(value)); err != nil {
logg.ErrorCtxf(ctx, "Failed to write data entry for sessionId: %s", sessionId, "key", key, "error", err)
continue