UNPKG

cloudcms-cli

Version:
41 lines (37 loc) 1.17 kB
var helper = require("../../../helper"); var AbstractCommand = require("../../abstract"); class UnassignCommand extends AbstractCommand { constructor() { super({ "group": "stack", "name": "unassign", "description": "Unassigns a datastore from a stack", "schema": { "properties": [{ "name": "stackId", "type": "string", "description": "Enter the stack ID:", "helper": "The ID of the project", "required": true, "args": ["stackId", "stack"] }, { "name": "key", "type": "string", "description": "Enter the key of the stack element:", "required": true, "args": ["key", "k"] }] } }); } handle(options, callback) { // call workhorse function helper.unassignFromStack(options.stackId, options.key, function(err) { callback(err); }); } } module.exports = UnassignCommand;