Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import { Controller } from '@nestjs/common';
import { MessagePattern } from '@nestjs/microservices';
import {
EventAnonCredsProofsDeleteById,
EventAnonCredsProofsDeleteByIdInput,
EventAnonCredsProofsGetAll,
EventAnonCredsProofsGetAllInput,
EventAnonCredsProofsGetById,
EventAnonCredsProofsGetByIdInput,
EventDidcommAnonCredsProofsRequest,
EventDidcommAnonCredsProofsRequestInput,
} from '@ocm/shared';
import { AnonCredsProofsService } from './anoncredsProofs.service.js';
@Controller('anoncredsProofs')
export class AnonCredsProofsController {
public constructor(private proofsService: AnonCredsProofsService) {}
@MessagePattern(EventAnonCredsProofsGetAll.token)
public async getAll(
options: EventAnonCredsProofsGetAllInput,
): Promise<EventAnonCredsProofsGetAll> {
return new EventAnonCredsProofsGetAll(
await this.proofsService.getAll(options),
options.tenantId,
);
}
@MessagePattern(EventAnonCredsProofsGetById.token)
public async getById(
options: EventAnonCredsProofsGetByIdInput,
): Promise<EventAnonCredsProofsGetById> {
return new EventAnonCredsProofsGetById(
await this.proofsService.getById(options),
options.tenantId,
);
}
@MessagePattern(EventAnonCredsProofsDeleteById.token)
public async deleteById(
options: EventAnonCredsProofsDeleteByIdInput,
): Promise<EventAnonCredsProofsDeleteById> {
return new EventAnonCredsProofsDeleteById(
await this.proofsService.deleteById(options),
options.tenantId,
);
}
@MessagePattern(EventDidcommAnonCredsProofsRequest.token)
public async request(
options: EventDidcommAnonCredsProofsRequestInput,
): Promise<EventDidcommAnonCredsProofsRequest> {
return new EventDidcommAnonCredsProofsRequest(
await this.proofsService.request(options),
options.tenantId,
);
}
}