1
+ import { sharedDrives } from "../../../api/shared-drives.ts" ;
2
+ import { fields } from "../../../flags.ts" ;
1
3
import { asserts } from "../../../lib/asserts.ts" ;
4
+ import { dataTable } from "../../../lib/data-table.ts" ;
2
5
import { loading } from "../../../lib/loading.ts" ;
6
+ import { pickJson } from "../../../lib/pick-json.ts" ;
3
7
import { input } from "../../../prompts/input.ts" ;
4
8
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" ;
9
9
import { defaultFields } from "../mod.ts" ;
10
10
11
11
/**
@@ -15,13 +15,13 @@ import { defaultFields } from "../mod.ts";
15
15
const subCommands : ReturnType < typeof command > [ ] = [ ] ;
16
16
17
17
export const del = command ( "delete" , {
18
- short : "Delete a template " ,
18
+ short : "Delete a shared drive " ,
19
19
long : `
20
- Delete a template from a team.
20
+ Delete a shared drive from a team.
21
21
` ,
22
22
commands : subCommands ,
23
23
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" ) ,
25
25
] ) . optional ( ) ,
26
26
flags : flags ( {
27
27
fields,
@@ -40,11 +40,11 @@ export const del = command("delete", {
40
40
id = await input ( "ID:" , {
41
41
filter : ( v ) => ! ! v . sequence . match ( / [ a - z A - Z 0 - 9 _ - ] / ) ,
42
42
} ) ;
43
- asserts ( id , "A template ID is required" ) ;
43
+ asserts ( id , "A shared drive ID is required" ) ;
44
44
}
45
45
46
46
const response = await loading (
47
- templates . delete ( { id } ) ,
47
+ sharedDrives . delete ( { id } ) ,
48
48
) ;
49
49
50
50
asserts ( response . ok , response ) ;
0 commit comments