From ced39b9328c6e4ed4d2782451d5e5f7d6e23b520 Mon Sep 17 00:00:00 2001 From: Badri Sunderarajan Date: Thu, 25 Feb 2021 15:38:27 +0530 Subject: [PATCH] Abbreviate PPs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And call them 'PP's instead of 'In charge' 😉 --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 5ac3378..3832987 100644 --- a/index.js +++ b/index.js @@ -76,15 +76,15 @@ app.post("/edcal", (req, res) => { if (req.body.command != 'edcal') { articleTable = (articles .reverse() - .map(a => `|${a.title}|${a.in_charge.map(u=>u.name).join(',')}|${a.due_date}|${a.publish_date}|${a.status}|`) + .map(a => `|${a.title}|${a.in_charge.map(u=>u.name[0]).join(',')}|${a.due_date}|${a.publish_date}|${a.status}|`) .join("\n")) res.send({ response_type: "in_channel", text: `--- #### Editorial Calendar -|Title|In charge|Due Date|Publish Date|Status| -|:----|:--------|:-------|:-----------|:-----| +|Title|PP|Due Date|Publish Date|Status| +|:----|:-|:-------|:-----------|:-----| ${articleTable} ---`, })