Skip to content

Commit

Permalink
Merge pull request #336 from holashchand/issue-1031
Browse files Browse the repository at this point in the history
[BUG]: Fixed template id required error for only qr code generation
  • Loading branch information
challabeehyv authored Jun 24, 2024
2 parents 9c09f34 + 6e98801 commit 4842229
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ export class CredentialsController {
const requestedTemplateId: string = req.headers['templateid'] as string;
const externalTemplate: string = req.headers['template'] as string;

if (!requestedTemplateId && !externalTemplate && accept !== 'application/json')
throw new BadRequestException('Template id is required');
if (!requestedTemplateId && !externalTemplate && ['application/pdf', 'text/html'].indexOf(accept) > -1)
throw new BadRequestException('Template id or template is required');
else if (!requestedTemplateId && !externalTemplate && accept === 'application/json')
return this.credentialsService.getCredentialById(
id,
Expand Down

0 comments on commit 4842229

Please sign in to comment.