UNPKG

@lifeomic/cli

Version:

CLI for interacting with the LifeOmic PHC API.

19 lines (15 loc) 458 B
'use strict'; const { del } = require('../../api'); const print = require('../../print'); exports.command = 'delete <cohortId>'; exports.desc = 'Delete a cohort by <cohortId>'; exports.builder = yargs => { yargs.positional('cohortId', { describe: 'The ID of the cohort to delete.', type: 'string' }); }; exports.handler = async argv => { await del(argv, `/v1/cohorts/${argv.cohortId}`); print(`Deleted cohort: ${argv.cohortId}`, argv); };