":" //; exec /usr/bin/env node --harmony "$0" "$@";
const standardEntity = require("../standardEntity");
const hapi        = require("../hapi");

module.exports = yargs => yargs.command({
  command: "sitecategory",
  desc: "sitecategory support",
  builder: yargs => standardEntity("sitecategory", {update: null, add: null})(yargs).command({
    command: "save <id> <name>",
    desc: "update/insert category",
    handler: hapi(async (api, {id, name}) => api.sitecategory.save({id, data: {name}}))
  }),
  handler() {yargs.showHelp()}
})
