cloudcms-cli
Version:
Cloud CMS Command-Line client
40 lines (36 loc) • 1.12 kB
JavaScript
var helper = require("../../../helper");
var AbstractCommand = require("../../abstract");
class ReadAssignmentCommand extends AbstractCommand
{
constructor()
{
super({
"group": "stack",
"name": "read-assignment",
"description": "Reads an assignment for a stack",
"schema": {
"properties": [{
"name": "stackId",
"type": "string",
"description": "Enter the stack ID",
"required": true,
"args": ["stack", "s", "id"]
}, {
"name": "key",
"type": "string",
"description": "The unique key for the assignment",
"required": true,
"args": ["key"]
}]
}
});
}
handle(options, callback)
{
// call workhorse function
helper.readAssignment(options.stackId, options.key, function(err) {
callback(err);
});
}
}
module.exports = ReadAssignmentCommand;