UNPKG

cloudcms-cli

Version:
40 lines (36 loc) 1.14 kB
var helper = require("../../../helper"); var AbstractCommand = require("../../abstract"); class DeleteSnapshotCommand extends AbstractCommand { constructor() { super({ "group": "repository", "name": "delete-snapshot", "description": "Deletes a snaphot", "schema": { "properties": [{ "name": "repositoryId", "type": "string", "description": "Enter the repository ID", "required": true, "args": ["repository", "r"] }, { "name": "snapshotId", "type": "string", "description": "Enter the snapshot ID", "required": true, "args": ["snapshot", "s", "id"] }] } }); } handle(options, callback) { // call workhorse function helper.deleteSnapshot(options.repositoryId, options.snapshotId, function(err) { callback(err); }); } } module.exports = DeleteSnapshotCommand;