forked from fauna/fauna-shell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdelete-endpoint.js
More file actions
30 lines (24 loc) · 750 Bytes
/
delete-endpoint.js
File metadata and controls
30 lines (24 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const { deleteEndpointOrError, errorOut } = require('../lib/misc.js')
const FaunaCommand = require('../lib/fauna-command.js')
class DeleteEndpoint extends FaunaCommand {
async run() {
const alias = this.args.endpoint_alias
return deleteEndpointOrError(alias).catch(function (err) {
errorOut(err.message, 1)
})
}
}
DeleteEndpoint.description = `
Deletes a connection endpoint for FaunaDB
`
DeleteEndpoint.examples = ['$ fauna delete-endpoint endpoint_alias']
// clear the default FaunaCommand flags that accept --host, --port, etc.
DeleteEndpoint.flags = {}
DeleteEndpoint.args = [
{
name: 'endpoint_alias',
required: true,
description: 'FaunaDB server endpoint alias',
},
]
module.exports = DeleteEndpoint