def refresh_via

cswap-bend-cli@0.1.0.0 · usage/gate.bend:193

import cswap-bend-cli@0.1.0.0/usage/gate.bend as Gate
import Base
import cswap-bend-cli@0.1.0.0/usage/cred.bend as UCred

193# Gate or direct POST, by the caller's choice.
194def refresh_via(g: Gate, +cred: String) -> IO(Gated):
195  match g:
196    case NoGate{}:
197      IO.bind(Result<&2, &2, String, String>, Gated, UCred.refresh(cred), r => IO.pure(Gated, plain.pick(r, cred)))
198    case Gate{slot, email, root}:
199      refresh_gated(slot, email, cred, root)

Uses (10)

Used by (2)