File tree Expand file tree Collapse file tree 2 files changed +4
-26
lines changed
Expand file tree Collapse file tree 2 files changed +4
-26
lines changed Original file line number Diff line number Diff line change @@ -32,30 +32,6 @@ function setAggregateRegistryOrgObj (query) {
3232 return [
3333 {
3434 $match : query
35- } ,
36- {
37- $project : {
38- _id : false ,
39- UUID : true ,
40- long_name : true ,
41- short_name : true ,
42- aliases : true ,
43- authority : true ,
44- reports_to : true ,
45- oversees : true ,
46- root_or_tlr : true ,
47- users : true ,
48- admins : true ,
49- charter_or_scope : true ,
50- disclosure_policy : true ,
51- product_list : true ,
52- soft_quota : true ,
53- hard_quota : true ,
54- contact_info : true ,
55- in_use : true ,
56- created : true ,
57- last_updated : true
58- }
5935 }
6036 ]
6137}
@@ -113,10 +89,11 @@ class BaseOrgRepository extends BaseRepository {
11389
11490 async getAllOrgs ( options = { } , returnLegacyFormat = false ) {
11591 const OrgRepository = require ( './orgRepository' )
92+ const orgRepo = new OrgRepository ( )
11693 let pg
11794 if ( returnLegacyFormat ) {
11895 const agt = setAggregateOrgObj ( { } )
119- pg = await OrgRepository . aggregatePaginate ( agt , options )
96+ pg = await orgRepo . aggregatePaginate ( agt , options )
12097 } else {
12198 const agt = setAggregateRegistryOrgObj ( { } )
12299 pg = await this . aggregatePaginate ( agt , options )
Original file line number Diff line number Diff line change @@ -165,10 +165,11 @@ class BaseUserRepository extends BaseRepository {
165165
166166 async getAllUsers ( options = { } , returnLegacyFormat = false ) {
167167 const UserRepository = require ( './userRepository' )
168+ const userRepo = new UserRepository ( )
168169 let pg
169170 if ( returnLegacyFormat ) {
170171 const agt = setAggregateUserObj ( { } )
171- pg = await UserRepository . aggregatePaginate ( agt , options )
172+ pg = await userRepo . aggregatePaginate ( agt , options )
172173 } else {
173174 const agt = setAggregateRegistryUserObj ( { } )
174175 pg = await this . aggregatePaginate ( agt , options )
You can’t perform that action at this time.
0 commit comments