Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
hubsmoke authored Jul 8, 2024
2 parents bd03fcd + 4b73e66 commit 4aaf98e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion desci-server/src/controllers/attestations/claims.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
6 changes: 6 additions & 0 deletions desci-server/src/services/Attestation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion desci-server/src/workers/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 4aaf98e

Please sign in to comment.