From 13ccf42a881b339c7b80426a19c5a39a850cc221 Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Thu, 6 Jun 2024 16:19:26 +0100 Subject: [PATCH] refactor: make read easier --- packages/upload-api/src/index/add.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/upload-api/src/index/add.js b/packages/upload-api/src/index/add.js index ed755319d..88a97b93f 100644 --- a/packages/upload-api/src/index/add.js +++ b/packages/upload-api/src/index/add.js @@ -104,9 +104,13 @@ const assertAllocated = async (context, space, digest, errorName) => { const publishIndexClaim = async (ctx, { content, index }) => { const { invocationConfig, connection } = ctx.claimsService const { issuer, audience, with: resource, proofs } = invocationConfig - const expiration = Infinity - const nb = { content, index } - const conf = { issuer, audience, with: resource, nb, expiration, proofs } - const res = await Assert.index.invoke(conf).execute(connection) + const res = await Assert.index.invoke({ + issuer, + audience, + with: resource, + nb: { content, index }, + expiration: Infinity, + proofs, + }).execute(connection) return res.out }