def info.rec

cswap-bend-cli@0.1.0.0 · collect.bend:109

import cswap-bend-cli@0.1.0.0/collect.bend as Collect
import Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
import cswap-bend-cli@0.1.0.0/act.bend as Act

109def info.rec(m: Maybe<&2, Json.Json>, +n: U32, +active: Bool, +live: String, +root: String) -> Act.of(Info):
110  match m:
111    case None{}:
112      Act.fail(Info, 1, "Account-" ++ U32.show(n) ++ " has no record")
113    case Some{+rec}:
114      Act.bind(String, Info, info.creds(active, live, root, U32.show(n), jstr_of(rec, "email")), c => Act.pure(Info, info.mk(n, rec, active, c)))

Uses (15)

Used by (1)