'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _cli = require('../../cli');

var route = function route(req, res) {
  var result;
  if (_cli.abeExtend.process('generate-posts', [''])) {
    result = {
      success: 1,
      msg: 'generate-posts is running'
    };
  } else {
    result = {
      success: 0,
      msg: 'cannot run process generate-posts, because an other one is already running'
    };
  }
  res.set('Content-Type', 'application/json');
  res.send(JSON.stringify(result));
};

exports.default = route;