cloudcms-cli
Version:
Cloud CMS Command-Line client
42 lines (37 loc) • 1.21 kB
JavaScript
var helper = require("../../../helper");
var AbstractCommand = require("../../abstract");
class RecreateFilenamesCommand extends AbstractCommand
{
constructor()
{
super({
"group": "branch",
"name": "recreate-filenames",
"description": "Recreates all filenames from the title of nodes on a given branch",
"schema": {
"properties": [{
"name": "repositoryId",
"type": "string",
"description": "Enter the repository ID",
"required": true,
"args": ["repository", "r"]
}, {
"name": "branchId",
"type": "string",
"description": "Enter the branch ID",
"required": true,
"args": ["branch", "b"]
}]
}
});
}
handle(options, callback)
{
var config = {};
// call workhorse function
helper.recreateFilenames(options.repositoryId, options.branchId, function(err) {
callback(err);
});
}
}
module.exports = RecreateFilenamesCommand;