File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ const sponsorT4Role = {
8989} ;
9090
9191const sponsorT5Role = {
92- "_id" : mongoose . Types . ObjectId ( ) ,
92+ "_id" : mongoose . Types . ObjectId . createFromTime ( 7 ) ,
9393 "name" : Constants . General . SPONSOR_T5 ,
9494 "routes" : [
9595 Constants . Routes . sponsorRoutes . post ,
@@ -109,6 +109,8 @@ function createAllSingularRoles() {
109109 const allRoutes = Constants . Routes . allRoutes ;
110110 let roles = [ ] ;
111111
112+ // i is unique integer so that objectId is constant
113+ var i = 1000000 ;
112114 for ( let routeGroupKey in allRoutes ) {
113115
114116 if ( ! allRoutes . hasOwnProperty ( routeGroupKey ) ) {
@@ -122,12 +124,13 @@ function createAllSingularRoles() {
122124 }
123125
124126 let role = {
125- _id : mongoose . Types . ObjectId ( ) ,
127+ _id : mongoose . Types . ObjectId ( i ) ,
126128 name : routeKey + routeGroupKey ,
127129 routes : routeGroup [ routeKey ] ,
128130 } ;
129131 let roleName = role . name ;
130132 roles [ roleName ] = role ;
133+ i -= 1 ;
131134 }
132135 }
133136
You can’t perform that action at this time.
0 commit comments