Skip to content

Commit 25cf5e6

Browse files
committed
break something
1 parent 619362d commit 25cf5e6

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

packages/compass-user-data/src/user-data.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const { log, mongoLogId } = createLogger('COMPASS-USER-STORAGE');
1010

1111
type SerializeContent<I> = (content: I) => string;
1212
type DeserializeContent = (content: string) => unknown;
13-
type GetResourceUrl = (path?: string) => Promise<string>;
13+
type GetResourceUrl = (path?: string) => string;
1414
type 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

packages/compass-web/src/entrypoint.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ function CompassWorkspace({
235235
className={connectedContainerStyles}
236236
>
237237
<WorkspacesPlugin
238-
userData={workspacesUserData}
238+
userData={workspacesUserData.current}
239239
initialWorkspaceTabs={initialWorkspaceTabs}
240240
openOnEmptyWorkspace={{ type: 'Welcome' }}
241241
onActiveWorkspaceTabChange={onActiveWorkspaceTabChange}

0 commit comments

Comments
 (0)