message: Remove rest2tasks /remove endpoint
diff: @@ -377,75 +377,3 @@ app.post('/promote', async (req, res) => {
  }
  })
  -
  -
  -app.post('/remove', async (req, res) => {
  -
  - req.checkBody({
  - 'projectName': {
  - notEmpty: true,
  - matches: {
  - options: [/^[a-zA-Z0-9-_]+$/],
  - errorMessage: 'projectName must be defined and must only contain alphanumeric, dashes and underline'
  - },
  - },
  - 'branch': {
  - notEmpty: true,
  - matches: {
  - options: [/^[a-zA-Z0-9-._\/]+$/],
  - errorMessage: 'branch must be defined and must only contain alphanumeric, dashes, underline, dots and slashes'
  - },
  - },
  - 'forceDeleteProductionEnvironment': {
  - optional: {},
  - isBoolean: {
  - errorMessage: 'should be a boolean'
  - }
  - }
  - });
  -
  - const result = await req.getValidationResult()
  -
  - if (!result.isEmpty()) {
  - res.status(400).send('There have been validation errors: ' + util.inspect(result.mapped()));
  - return;
  - }
  -
  - const data = {
  - projectName: req.body.projectName,
  - branch: req.body.branch,
  - type: 'branch',
  - forceDeleteProductionEnvironment: req.body.forceDeleteProductionEnvironment,
  - }
  -
  - console.log(data)
  -
  - const meta = {
  - projectName: data.projectName,
  - branchName: data.branch
  - }
  -
  - try {
  - const taskResult = await createRemoveTask(data);
  - sendToLagoonLogs('info', data.projectName, '', `rest:remove:receive`, meta,
  - `*[${data.projectName}]* REST remove trigger \`${data.branch}\``
  - )
  - res.status(200).type('json').send({ "ok": "true", "message": taskResult})
  - return;
  - } catch (error) {
  - switch (error.name) {
  - case "ProjectNotFound":
  - case "ActiveSystemsNotFound":
  - res.status(404).type('json').send({ "ok": "false", "message": error.message})
  - return;
  - break;
  -
  - default:
  - logger.error(error)
  - res.status(500).type('json').send({ "ok": "false", "message": `Internal Error: ${error}`})
  - return;
  - break;
  - }
  - }
  -
  -})
  