@@ -10,7 +10,7 @@ const { log, mongoLogId } = createLogger('COMPASS-USER-STORAGE');
1010
1111type SerializeContent < I > = ( content : I ) => string ;
1212type DeserializeContent = ( content : string ) => unknown ;
13- type GetResourceUrl = ( path ?: string ) => Promise < string > ;
13+ type GetResourceUrl = ( path ?: string ) => string ;
1414type AuthenticatedFetch = (
1515 url : RequestInfo | URL ,
1616 options ?: RequestInit
@@ -296,7 +296,7 @@ export class AtlasUserData<T extends z.Schema> extends IUserData<T> {
296296 }
297297
298298 async write ( id : string , content : z . input < T > ) : Promise < boolean > {
299- const url = await this . getResourceUrl (
299+ const url = this . getResourceUrl (
300300 `${ this . dataType } /${ this . orgId } /${ this . projectId } `
301301 ) ;
302302
@@ -332,7 +332,7 @@ export class AtlasUserData<T extends z.Schema> extends IUserData<T> {
332332 }
333333
334334 async delete ( id : string ) : Promise < boolean > {
335- const url = await this . getResourceUrl (
335+ const url = this . getResourceUrl (
336336 `${ this . dataType } /${ this . orgId } /${ this . projectId } /${ id } `
337337 ) ;
338338
@@ -362,9 +362,7 @@ export class AtlasUserData<T extends z.Schema> extends IUserData<T> {
362362 } ;
363363 try {
364364 const response = await this . authenticatedFetch (
365- await this . getResourceUrl (
366- `${ this . dataType } /${ this . orgId } /${ this . projectId } `
367- ) ,
365+ this . getResourceUrl ( `${ this . dataType } /${ this . orgId } /${ this . projectId } ` ) ,
368366 {
369367 method : 'GET' ,
370368 }
@@ -397,7 +395,7 @@ export class AtlasUserData<T extends z.Schema> extends IUserData<T> {
397395 } ;
398396
399397 await this . authenticatedFetch (
400- await this . getResourceUrl (
398+ this . getResourceUrl (
401399 `${ this . dataType } /${ this . orgId } /${ this . projectId } /${ id } `
402400 ) ,
403401 {
@@ -415,7 +413,7 @@ export class AtlasUserData<T extends z.Schema> extends IUserData<T> {
415413 'Atlas Backend' ,
416414 'Error updating data' ,
417415 {
418- url : await this . getResourceUrl (
416+ url : this . getResourceUrl (
419417 `${ this . dataType } /${ this . orgId } /${ this . projectId } /${ id } `
420418 ) ,
421419 error : ( error as Error ) . message ,
@@ -427,7 +425,7 @@ export class AtlasUserData<T extends z.Schema> extends IUserData<T> {
427425
428426 // TODO: change this depending on whether or not updateAttributes can provide all current data
429427 async readOne ( id : string ) : Promise < z . output < T > > {
430- const url = await this . getResourceUrl (
428+ const url = this . getResourceUrl (
431429 `${ this . dataType } /${ this . orgId } /${ this . projectId } /${ id } `
432430 ) ;
433431
0 commit comments