Skip to content

Commit 2e63004

Browse files
authored
fix(shared-drives): use correct endpoints for delete and get (#56)
1 parent 31296df commit 2e63004

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

commands/shared-drive/delete/mod.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
import { sharedDrives } from "../../../api/shared-drives.ts";
2+
import { fields } from "../../../flags.ts";
13
import { asserts } from "../../../lib/asserts.ts";
4+
import { dataTable } from "../../../lib/data-table.ts";
25
import { loading } from "../../../lib/loading.ts";
6+
import { pickJson } from "../../../lib/pick-json.ts";
37
import { input } from "../../../prompts/input.ts";
48
import { args, command, flags, z } from "../../../zcli.ts";
5-
import { dataTable } from "../../../lib/data-table.ts";
6-
import { fields } from "../../../flags.ts";
7-
import { pickJson } from "../../../lib/pick-json.ts";
8-
import { templates } from "../../../api/templates.ts";
99
import { defaultFields } from "../mod.ts";
1010

1111
/**
@@ -15,13 +15,13 @@ import { defaultFields } from "../mod.ts";
1515
const subCommands: ReturnType<typeof command>[] = [];
1616

1717
export const del = command("delete", {
18-
short: "Delete a template",
18+
short: "Delete a shared drive",
1919
long: `
20-
Delete a template from a team.
20+
Delete a shared drive from a team.
2121
`,
2222
commands: subCommands,
2323
args: args().tuple([
24-
z.string().describe("The ID of the template to delete"),
24+
z.string().describe("The ID of the shared drive to delete"),
2525
]).optional(),
2626
flags: flags({
2727
fields,
@@ -40,11 +40,11 @@ export const del = command("delete", {
4040
id = await input("ID:", {
4141
filter: (v) => !!v.sequence.match(/[a-zA-Z0-9_-]/),
4242
});
43-
asserts(id, "A template ID is required");
43+
asserts(id, "A shared drive ID is required");
4444
}
4545

4646
const response = await loading(
47-
templates.delete({ id }),
47+
sharedDrives.delete({ id }),
4848
);
4949

5050
asserts(response.ok, response);

commands/shared-drive/get/mod.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
import { sharedDrives } from "../../../api/shared-drives.ts";
2+
import { fields } from "../../../flags.ts";
13
import { asserts } from "../../../lib/asserts.ts";
4+
import { dataTable } from "../../../lib/data-table.ts";
25
import { loading } from "../../../lib/loading.ts";
6+
import { pickJson } from "../../../lib/pick-json.ts";
37
import { input } from "../../../prompts/input.ts";
48
import { args, command, flags, z } from "../../../zcli.ts";
5-
import { dataTable } from "../../../lib/data-table.ts";
6-
import { fields } from "../../../flags.ts";
7-
import { pickJson } from "../../../lib/pick-json.ts";
8-
import { templates } from "../../../api/templates.ts";
99
import { defaultFields } from "../mod.ts";
1010

1111
/**
@@ -15,13 +15,13 @@ import { defaultFields } from "../mod.ts";
1515
const subCommands: ReturnType<typeof command>[] = [];
1616

1717
export const get = command("get", {
18-
short: "Get a template",
18+
short: "Get a shared drive",
1919
long: `
20-
Get a template from a team.
20+
Get a shared drive from a team.
2121
`,
2222
commands: subCommands,
2323
args: args().tuple([
24-
z.string().describe("The ID of the template to get"),
24+
z.string().describe("The ID of the shared drive to get"),
2525
]).optional(),
2626
flags: flags({
2727
fields,
@@ -40,11 +40,11 @@ export const get = command("get", {
4040
id = await input("ID:", {
4141
filter: (v) => !!v.sequence.match(/[a-zA-Z0-9_-]/),
4242
});
43-
asserts(id, "A template ID is required");
43+
asserts(id, "A shared drive ID is required");
4444
}
4545

4646
const response = await loading(
47-
templates.get({ id }),
47+
sharedDrives.get({ id }),
4848
);
4949

5050
asserts(response.ok, response);

0 commit comments

Comments
 (0)