wip-flag-migration #28
@ -24,7 +24,6 @@ import (
|
|||||||
var (
|
var (
|
||||||
scriptDir = path.Join("services", "registration")
|
scriptDir = path.Join("services", "registration")
|
||||||
translationDir = path.Join(scriptDir, "locale")
|
translationDir = path.Join(scriptDir, "locale")
|
||||||
//dbFile = path.Join(scriptDir, "userdata.gdbm")
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -219,13 +218,13 @@ func (h *Handlers) SetResetSingleEdit(ctx context.Context, sym string, input []b
|
|||||||
|
|
||||||
switch menuOption {
|
switch menuOption {
|
||||||
case "2":
|
case "2":
|
||||||
res.FlagReset = append(res.FlagSet, flags["flag_allow_update"])
|
res.FlagReset = append(res.FlagReset, flags["flag_allow_update"])
|
||||||
res.FlagSet = append(res.FlagSet, flags["flag_single_edit"])
|
res.FlagSet = append(res.FlagSet, flags["flag_single_edit"])
|
||||||
case "3":
|
case "3":
|
||||||
Alfred-mk marked this conversation as resolved
Outdated
|
|||||||
res.FlagReset = append(res.FlagSet, flags["flag_allow_update"])
|
res.FlagReset = append(res.FlagReset, flags["flag_allow_update"])
|
||||||
res.FlagSet = append(res.FlagSet, flags["flag_single_edit"])
|
res.FlagSet = append(res.FlagSet, flags["flag_single_edit"])
|
||||||
case "4":
|
case "4":
|
||||||
res.FlagReset = append(res.FlagSet, flags["flag_allow_update"])
|
res.FlagReset = append(res.FlagReset, flags["flag_allow_update"])
|
||||||
res.FlagSet = append(res.FlagSet, flags["flag_single_edit"])
|
res.FlagSet = append(res.FlagSet, flags["flag_single_edit"])
|
||||||
default:
|
default:
|
||||||
res.FlagReset = append(res.FlagReset, flags["flag_single_edit"])
|
res.FlagReset = append(res.FlagReset, flags["flag_single_edit"])
|
||||||
@ -755,11 +754,9 @@ func (h *Handlers) GetRecipient(ctx context.Context, sym string, input []byte) (
|
|||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetSender retrieves the public key from a JSON data file.
|
// GetSender retrieves the public key from the Gdbm Db
|
||||||
func (h *Handlers) GetSender(ctx context.Context, sym string, input []byte) (resource.Result, error) {
|
func (h *Handlers) GetSender(ctx context.Context, sym string, input []byte) (resource.Result, error) {
|
||||||
res := resource.Result{}
|
res := resource.Result{}
|
||||||
|
|
||||||
//accountData, err := h.accountFileHandler.ReadAccountData()
|
|
||||||
publicKey, err := h.db.Fetch([]byte(PublicKeyKey))
|
publicKey, err := h.db.Fetch([]byte(PublicKeyKey))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return res, err
|
return res, err
|
||||||
@ -770,7 +767,7 @@ func (h *Handlers) GetSender(ctx context.Context, sym string, input []byte) (res
|
|||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetAmount retrieves the amount from a JSON data file.
|
// GetAmount retrieves the amount from teh Gdbm Db
|
||||||
func (h *Handlers) GetAmount(ctx context.Context, sym string, input []byte) (resource.Result, error) {
|
func (h *Handlers) GetAmount(ctx context.Context, sym string, input []byte) (resource.Result, error) {
|
||||||
res := resource.Result{}
|
res := resource.Result{}
|
||||||
amount, err := h.db.Fetch([]byte(Amount))
|
amount, err := h.db.Fetch([]byte(Amount))
|
||||||
|
Loading…
Reference in New Issue
Block a user
here appends to set but assign to reset. happens in the below, too.