@@ -73,7 +73,6 @@ export abstract class IUserData<T extends z.Schema> {
73
73
protected readonly validator : T ;
74
74
protected readonly serialize : SerializeContent < z . input < T > > ;
75
75
protected readonly deserialize : DeserializeContent ;
76
-
77
76
constructor (
78
77
validator : T ,
79
78
{
@@ -96,6 +95,7 @@ export abstract class IUserData<T extends z.Schema> {
96
95
id : string ,
97
96
data : Partial < z . input < T > >
98
97
) : Promise < z . output < T > > ;
98
+ abstract setOrgAndGroupId ( orgId : string , groupId : string ) : void ;
99
99
}
100
100
101
101
export class FileUserData < T extends z . Schema > extends IUserData < T > {
@@ -333,15 +333,28 @@ export class FileUserData<T extends z.Schema> extends IUserData<T> {
333
333
} ) ;
334
334
return await this . readOne ( id ) ;
335
335
}
336
+
337
+ setOrgAndGroupId ( orgId : string , groupId : string ) : void {
338
+ // sample log error
339
+ log . error (
340
+ mongoLogId ( 1_001_000_237 ) , // not sure what this log id should be
341
+ 'UserData' ,
342
+ 'setOrgAndGroupId should not be called for FileUserData' ,
343
+ {
344
+ orgId,
345
+ groupId,
346
+ }
347
+ ) ;
348
+ }
336
349
}
337
350
338
351
// TODO: update endpoints to reflect the merged api endpoints
339
352
export class AtlasUserData < T extends z . Schema > extends IUserData < T > {
340
353
private readonly authenticatedFetch ;
341
354
// should this BASE_URL be a parameter passed to the constructor?
342
355
// this might make future usage of this code easier, if we want to call a different endpoint
343
- private readonly orgId ;
344
- private readonly groupId ;
356
+ private orgId : string = '' ;
357
+ private groupId : string = '' ;
345
358
private readonly BASE_URL = 'cluster-connection.cloud-local.mongodb.com' ;
346
359
constructor (
347
360
validator : T ,
0 commit comments