In JavaScript, I am trying to make multiple key updates to etcd in 1 transaction. I've filtered the key-value pairs that I want to update before the transaction so basically I don't have any comparisons to do. I want to use it like this:
const client = new Etcd3({ hosts: connectionString });
...
await client.if(true)
.then(
client.put(entry1).value(JSON.stringify(account1, null, 4));
client.put(entry2).value(JSON.stringify(account2, null, 4));
client.put(entry3).value(JSON.stringify(account3, null, 4));
client.put(entry4).value(JSON.stringify(account4, null, 4));
)
.else();
is there anything I can put instead of this true that will act the same way?