Skip to content

Commit

Permalink
hotfix:configuration-changes
Browse files Browse the repository at this point in the history
Signed-off-by: pallavicoder <[email protected]>
  • Loading branch information
pallavighule committed Oct 4, 2024
1 parent 435f68a commit 3168182
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,6 @@ KEYCLOAK_REALM=xxxxxxx

ENABLE_CORS_IP_LIST="" # Provide a list of domains that are allowed to use this server
SCHEMA_FILE_SERVER_URL= // Please provide schema URL
SCHEMA_FILE_SERVER_TOKEN=xxxxxxxx // Please provide schema file server token for polygon
SCHEMA_FILE_SERVER_TOKEN=xxxxxxxx // Please provide schema file server token for polygon

FILEUPLOAD_CACHE_TTL= //Provide file upload cache ttl
4 changes: 3 additions & 1 deletion apps/api-gateway/src/issuance/issuance.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,9 @@ async downloadBulkIssuanceCSVTemplate(
},
required: true
})
@UseInterceptors(FileInterceptor('file'))
@UseInterceptors(FileInterceptor('file', {
limits: { fieldSize: 100 * 1024 * 1024 }
}))

async issueBulkCredentials(
@Body() clientDetails: ClientDetails,
Expand Down
7 changes: 4 additions & 3 deletions apps/issuance/src/issuance.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1173,9 +1173,10 @@ async sendEmailForCredentialOffer(sendEmailCredentialOffer: SendEmailCredentialO
credentialPayload.fileName = fileName;
const newCacheKey = uuidv4();

await this.cacheManager.set(requestId ? requestId : newCacheKey, JSON.stringify(credentialPayload), 60000);

return newCacheKey;
const cacheTTL = Number(process.env.FILEUPLOAD_CACHE_TTL) || 60000;
await this.cacheManager.set(requestId || newCacheKey, JSON.stringify(credentialPayload), cacheTTL);

return newCacheKey;

} catch (error) {
this.logger.error(`error in validating credentials : ${error.response}`);
Expand Down

0 comments on commit 3168182

Please sign in to comment.