def fill

cswap-bend-cli@0.1.0.0 · daemon/identity.bend:42

import cswap-bend-cli@0.1.0.0/daemon/identity.bend as Identity
import Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
import cswap-bend-cli@0.1.0.0/store/seq.bend as SSeq

42# Fill an empty uuid, once, under the roster lock (switcher.backfill_account_uuid).
43def fill(+seq: Json.Json, +slot: String, +uuid: String, +ts: String) -> Json.Json:
44  fill2(String.is_empty(str_of(Maybe.default(&2, Json.Json, SSeq.slot_record(seq, slot), Json.JObj{Json.JNil{}}), "uuid")), seq, slot, uuid, ts)

Uses (7)

Used by (1)