def creds_checked
cswap-bend-cli@0.1.0.0 · store.bend:278
import cswap-bend-cli@0.1.0.0/store.bend as Store
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/store/base.bend as SBase
278def creds_checked(+ctx: SBase.Ctx, +cfg: Json.Json) -> Act.of(String):
279 do ActM<String>:
280 +creds : String <- capture(ctx, cfg)
281 Act.guard(SBase.nonempty(creds), 3, "No credentials found for current account")
282 Act.guard(SBase.not_(SBase.looks_like_api_key(creds)), 2, api_key_msg())
283 return creds