Skip to content

Commit

Permalink
Merge branch 'credential' of https://github.com/techsavvyash/sunbird-…
Browse files Browse the repository at this point in the history
…rc-core into credential
  • Loading branch information
techsavvyash committed Jul 10, 2023
2 parents 13a35cc + 32954b4 commit 05722ed
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,6 @@ describe('CredentialsService', () => {
const validate = ajv.compile(issueCredentialReturnTypeSchema);
const getCredReqValidate = ajv.compile(getCredentialByIdSchema);

let issuerDid: string, subjectDid: string;

// beforeAll(async () => {
// issuerDid = await this.httpService.
// })

beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
imports: [HttpModule],
Expand Down Expand Up @@ -247,18 +241,4 @@ describe('CredentialsService', () => {
);
}
});

// it('should show a stremable file', async () => {
// const newCred = await service.issueCredential(sampleCredReqPayload);
// const renderReq = {
// ...newCred,
// template:
// '<html lang=\'en\'> <head> <meta charset=\'UTF-8\' /> <meta http-equiv=\'X-UA-Compatible\' content=\'IE=edge\' /> <meta name=\'viewport\' content=\'width=device-width, initial-scale=1.0\' /> <title>Certificate</title> </head> <body> <div style="width:800px; height:600px; padding:20px; text-align:center; border: 10px solid #787878"> <div style="width:750px; height:550px; padding:20px; text-align:center; border: 5px solid #787878"> <span style="font-size:50px; font-weight:bold">Certificate of Completion</span> <br><br> <span style="font-size:25px"><i>This is to certify that</i></span> <br><br> <span style="font-size:30px"><b>{{name}}</b></span><br/><br/> <span style="font-size:25px"><i>has completed the course</i></span> <br/><br/> <span style="font-size:30px">{{programme}}</span> <br/><br/> <span style="font-size:20px">with score of <b>{{grade}}%</b></span> <br/><br/><br/><br/> <span style="font-size:25px"></span><br> </div> </div> </body> </html>',
// output: 'PDF',
// schema: {},
// };
// expect(service.renderCredential(renderReq as any)).toBeInstanceOf(
// StreamableFile,
// );
// });
});
Original file line number Diff line number Diff line change
@@ -1,28 +1,8 @@
import { ApiProperty } from "@nestjs/swagger";
import { W3CCredential } from "did-jwt-vc";
import { CredentialStatus, DateType, IssuerType } from "did-jwt-vc/lib/types";
import { Extensible } from "did-resolver";


// class Credential implements W3CCredential {
// context: string | string[];
// id?: string;
// type: string[];
// issuer: IssuerType;
// issuanceDate: DateType;
// expirationDate?: DateType;
// credentialSubject: Extensible<{
// id?: string
// }>;
// credentialStatus?: CredentialStatus
// // eslint-disable-next-line @typescript-eslint/no-explicit-any
// evidence?: any;
// // eslint-disable-next-line @typescript-eslint/no-explicit-any
// termsOfUse?: any;
// }
export class GetCredentialByIdResponseDTO {
@ApiProperty({
// type: Credential,
description: 'Credential',
})
credential: W3CCredential;
Expand Down

0 comments on commit 05722ed

Please sign in to comment.