File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,17 @@ export class GroupsController {
49
49
return groups . map ( ( g ) => mapGroupToResponseDTO ( g ) )
50
50
}
51
51
52
+ @Get ( "/cachedgroups" )
53
+ @ApiOperation ( { description : "Returns the cached groups." } )
54
+ @ApiCreatedResponse ( )
55
+ async getCachedGroups ( ) {
56
+ const groups = await this . groupsService . getCachedGroups ( )
57
+
58
+ console . log ( "Controller" , groups )
59
+
60
+ return groups
61
+ }
62
+
52
63
@Get ( ":group" )
53
64
@ApiOperation ( { description : "Returns a specific group." } )
54
65
@ApiCreatedResponse ( { type : Group } )
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export class GroupsService {
42
42
}
43
43
44
44
/**
45
- * Initialises the service, caches groups and may sync contrac
45
+ * Initialises the service, caches groups and may sync contract
46
46
* groups if required.
47
47
*/
48
48
async initialize ( ) {
@@ -630,6 +630,12 @@ export class GroupsService {
630
630
return group
631
631
}
632
632
633
+ async getCachedGroups ( ) {
634
+ console . log ( "Service" , Array . from ( this . cachedGroups . keys ( ) ) )
635
+
636
+ return Array . from ( this . cachedGroups . keys ( ) )
637
+ }
638
+
633
639
/**
634
640
* Checks if a member belongs to a group.
635
641
* @param groupId Group id.
You can’t perform that action at this time.
0 commit comments