def direct2
cswap-bend-cli@0.1.0.0 · switch.bend:45
import cswap-bend-cli@0.1.0.0/switch.bend as Switch
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
import cswap-bend-cli@0.1.0.0/swbase.bend as B
import cswap-bend-cli@0.1.0.0/swlive.bend as L
import cswap-bend-cli@0.1.0.0/store/base.bend as SBase
import cswap-bend-cli@0.1.0.0/store/seq.bend as SSeq
45def direct2(+ctx: SBase.Ctx, +seq: Json.Json, +ident: String, +force: Bool, +opts: L.Opts, +r: SSeq.Resolved) -> Act.of(Json.Json):
46 match r:
47 case SSeq.RNone{}:
48 Act.fail(Json.Json, B.e_not_found(), "No account found with identifier: " ++ ident)
49 case SSeq.RAmb{msg}:
50 Act.fail(Json.Json, B.e_config(), msg)
51 case SSeq.RSlot{n}:
52 direct3(ctx, seq, n, force, opts, SSeq.slot_record(seq, n))