cloudcms-cli
Version:
Cloud CMS Command-Line client
47 lines (43 loc) • 1.51 kB
JavaScript
var helper = require("../../../helper");
var AbstractCommand = require("../../abstract");
class SyncRepositoryAnchorSnapshotsCommand extends AbstractCommand
{
constructor()
{
super({
"group": "admin",
"name": "sync-repository-anchor-snapshots",
"description": "Synchronizes the anchor snapshots for a repository",
"schema": {
"properties": [{
"name": "repositoryId",
"type": "string",
"description": "Enter the repository ID",
"required": true,
"args": ["repository", "r"]
}, {
"name": "username",
"type": "string",
"description": "Admin username",
"required": true,
"args": ["username", "u"]
}, {
"name": "password",
"type": "string",
"description": "Admin password",
"required": true,
"hidden": true,
"args": ["password", "p"]
}]
}
});
}
handle(options, callback)
{
// call workhorse function
helper.syncRepositoryAnchorSnapshots(options.repositoryId, options.username, options.password, function(err) {
callback(err);
});
}
}
module.exports = SyncRepositoryAnchorSnapshotsCommand;