Commit 5e093829 authored by Hidde-Jan Jongsma's avatar Hidde-Jan Jongsma

Rename type to name

parent e599cada
......@@ -7,7 +7,7 @@ import { CredentialVerifyRequest } from 'src/requests/credential-verify-request.
* e.g. connectors for Jolocom, IRMA, ...
*/
export interface ConnectorService {
type: string;
name: string;
/**
* Method for registering an organisation to use a certain SSI implementation
* E.g. for Jolocom a self-sovereign identity must be created and anchored on Ethereum (see: https://jolocom-lib.readthedocs.io/en/latest/gettingStarted.html#how-to-create-a-self-sovereign-identity)
......
......@@ -18,8 +18,8 @@ export class ConnectorsService {
this.connectors.push(this.irmaService);
}
getConnector(type: string) {
return this.connectors.find(connector => connector.type === type);
getConnector(name: string) {
return this.connectors.find(connector => connector.name === name);
}
async registerOrganization(organization: Organization) {
......
......@@ -108,7 +108,7 @@ interface IrmaCredential {
@Injectable()
export class IrmaService implements ConnectorService {
type = 'irma';
name = 'irma';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async registerOrganization(organization: Organization) {
......
......@@ -26,7 +26,7 @@ const DEFAULT_EXPIRY_MS = 60 * 60 * 1000;
@Injectable()
export class JolocomService implements ConnectorService {
type = 'jolocom';
name = 'jolocom';
private registry: JolocomRegistry;
private logger: Logger;
......
......@@ -22,7 +22,7 @@ export class IssueController {
issueRequest,
availableConnectors: await this.connectorsService
.availableIssueConnectors(issueRequest)
.then(cs => cs.map(c => c.type)),
.then(cs => cs.map(c => c.name)),
};
}
......
......@@ -36,7 +36,7 @@ export class VerifyController {
verifyRequest,
availableConnectors: await this.connectorsService
.availableVerifyConnectors(verifyRequest)
.then(cs => cs.map(c => c.type)),
.then(cs => cs.map(c => c.name)),
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment