Total Complexity | 1 |
Complexity/F | 1 |
Lines of Code | 19 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { ICacheRBAC, IDynamicStorageRbac, IStorageRbac } from '../../../src'; |
||
2 | import { RBAC } from '../storage'; |
||
3 | import { Inject, Injectable, Optional } from '@nestjs/common'; |
||
4 | |||
5 | @Injectable() |
||
6 | export class AsyncService implements IDynamicStorageRbac { |
||
7 | constructor( |
||
8 | @Optional() @Inject('ICacheRBAC') |
||
9 | private readonly cache?: ICacheRBAC, |
||
10 | ){ |
||
11 | |||
12 | } |
||
13 | async getRbac(): Promise<IStorageRbac> { |
||
14 | return new Promise((resolve) => { |
||
15 | resolve(RBAC); |
||
16 | }); |
||
17 | } |
||
18 | } |
||
19 |