Skip to content

Commit b91a456

Browse files
committed
fix: styles
1 parent 5abb986 commit b91a456

File tree

3 files changed

+22
-32
lines changed

3 files changed

+22
-32
lines changed

src/common/atlas/apiClient.ts

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
import config from "../../config.js";
22
import createClient, { Middleware } from "openapi-fetch";
33

4-
import {
5-
paths,
6-
ClusterDescription20240805,
7-
NetworkPermissionEntry,
8-
CloudDatabaseUser,
9-
} from "./openapi.js";
4+
import { paths, ClusterDescription20240805, NetworkPermissionEntry, CloudDatabaseUser } from "./openapi.js";
105

116
export interface OAuthToken {
127
access_token: string;
@@ -253,21 +248,18 @@ export class ApiClient {
253248
params: {
254249
path: {
255250
groupId,
256-
}
257-
}
251+
},
252+
},
258253
});
259254
return data;
260255
}
261256

262-
async createProjectIpAccessList(
263-
groupId: string,
264-
...entries: NetworkPermissionEntry[]
265-
) {
257+
async createProjectIpAccessList(groupId: string, ...entries: NetworkPermissionEntry[]) {
266258
const { data } = await this.client.POST(`/api/atlas/v2/groups/{groupId}/accessList`, {
267259
params: {
268260
path: {
269261
groupId,
270-
}
262+
},
271263
},
272264
body: entries,
273265
});
@@ -279,8 +271,8 @@ export class ApiClient {
279271
params: {
280272
path: {
281273
groupId,
282-
}
283-
}
274+
},
275+
},
284276
});
285277
return data;
286278
}
@@ -290,8 +282,8 @@ export class ApiClient {
290282
params: {
291283
path: {
292284
groupId,
293-
}
294-
}
285+
},
286+
},
295287
});
296288
return data;
297289
}
@@ -307,30 +299,30 @@ export class ApiClient {
307299
path: {
308300
groupId,
309301
clusterName,
310-
}
311-
}
302+
},
303+
},
312304
});
313305
return data;
314306
}
315307

316308
async createCluster(groupId: string, cluster: ClusterDescription20240805) {
317-
const { data } = await this.client.POST('/api/atlas/v2/groups/{groupId}/clusters', {
309+
const { data } = await this.client.POST("/api/atlas/v2/groups/{groupId}/clusters", {
318310
params: {
319311
path: {
320312
groupId,
321-
}
313+
},
322314
},
323315
body: cluster,
324316
});
325317
return data;
326318
}
327319

328320
async createDatabaseUser(groupId: string, user: CloudDatabaseUser) {
329-
const { data } = await this.client.POST('/api/atlas/v2/groups/{groupId}/databaseUsers', {
321+
const { data } = await this.client.POST("/api/atlas/v2/groups/{groupId}/databaseUsers", {
330322
params: {
331323
path: {
332324
groupId,
333-
}
325+
},
334326
},
335327
body: user,
336328
});
@@ -342,8 +334,8 @@ export class ApiClient {
342334
params: {
343335
path: {
344336
groupId,
345-
}
346-
}
337+
},
338+
},
347339
});
348340
return data;
349341
}

src/tools/atlas/inspectCluster.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class InspectClusterTool extends AtlasToolBase {
2424
if (!cluster) {
2525
throw new Error("Cluster not found");
2626
}
27-
27+
2828
return {
2929
content: [
3030
{

src/tools/atlas/listProjects.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ export class ListProjectsTool extends AtlasToolBase {
1212
const data = await this.apiClient!.listProjects();
1313

1414
if (data?.results?.length) {
15-
throw new Error("No projects found in your MongoDB Atlas account.")
15+
throw new Error("No projects found in your MongoDB Atlas account.");
1616
}
1717

1818
// Format projects as a table
19-
const rows = data!.results!
20-
.map((project) => {
19+
const rows = data!
20+
.results!.map((project) => {
2121
const created = project.created as unknown as { $date: string };
2222
const createdAt = created ? new Date(created.$date).toLocaleString() : "N/A";
2323
return `${project.name} | ${project.id} | ${createdAt}`;
@@ -27,9 +27,7 @@ export class ListProjectsTool extends AtlasToolBase {
2727
----------------| ----------------| ----------------
2828
${rows}`;
2929
return {
30-
content: [
31-
{ type: "text", text: formattedProjects },
32-
],
30+
content: [{ type: "text", text: formattedProjects }],
3331
};
3432
}
3533
}

0 commit comments

Comments
 (0)