diff --git a/desci-server/src/controllers/attestations/claims.ts b/desci-server/src/controllers/attestations/claims.ts index 5e72e313f..736cd3124 100644 --- a/desci-server/src/controllers/attestations/claims.ts +++ b/desci-server/src/controllers/attestations/claims.ts @@ -135,7 +135,7 @@ export const claimEntryRequirements = async (req: Request, res: Response, _next: logger.info({ communityId, body: req.body }, 'claimEntryRequirements'); const uuid = ensureUuidEndsWithDot(nodeUuid); - const entryAttestations = await attestationService.getCommunityEntryAttestations(communityId); + const entryAttestations = await attestationService.getAllCommunityEntryAttestations(communityId); logger.info({ entryAttestations }); const claimables = (await asyncMap(entryAttestations, async (attestation) => { diff --git a/desci-server/src/services/Attestation.ts b/desci-server/src/services/Attestation.ts index 791fdf17c..ca8f76813 100644 --- a/desci-server/src/services/Attestation.ts +++ b/desci-server/src/services/Attestation.ts @@ -297,6 +297,12 @@ export class AttestationService { return prisma.communityEntryAttestation.findMany({ where: { desciCommunityId: communityId, required: true } }); } + async getAllCommunityEntryAttestations(communityId: number) { + const community = await communityService.findCommunityById(communityId); + if (!community) throw new CommunityNotFoundError(); + return prisma.communityEntryAttestation.findMany({ where: { desciCommunityId: communityId } }); + } + async claimAttestation({ attestationId, attestationVersion, diff --git a/desci-server/src/workers/publish.ts b/desci-server/src/workers/publish.ts index 2f3c3bd85..9486c3703 100644 --- a/desci-server/src/workers/publish.ts +++ b/desci-server/src/workers/publish.ts @@ -46,6 +46,7 @@ async function processPublishQueue() { try { const txStatus = await checkTransaction(task.transactionId, task.uuid); + logger.info({ txStatus }, 'publish::processPublishQueue txStatus'); if (txStatus === 1) { publishHandler(task) .then(async (published) => { @@ -80,7 +81,7 @@ async function processPublishQueue() { } return ProcessOutcome.TaskCompleted; } catch (err) { - logger.error({ err }, 'ProcessPublishQueue::ERROR'); + logger.error({ err }, 'publish::processPublishQueue ProcessPublishQueue::ERROR'); return ProcessOutcome.Error; } finally { lockService.freeLock(task.transactionId);