From e4f0c25b02839e5d752bdd97e359e6b357d81b54 Mon Sep 17 00:00:00 2001 From: Alexander Paz Date: Fri, 16 Nov 2018 20:45:09 -0500 Subject: [PATCH] Changing current-mood to the root --- packages/hubot/package.json | 1 + packages/prathu-reaction/src/currentMood.js | 4 ++-- packages/prathu-reaction/src/currentMood.test.js | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/hubot/package.json b/packages/hubot/package.json index ff7f6da..074aef0 100644 --- a/packages/hubot/package.json +++ b/packages/hubot/package.json @@ -12,6 +12,7 @@ "dependencies": { "prathu-example": "*", "prathu-poem": "*", + "prathu-reaction": "*", "hubot": "^2.19.0", "hubot-cronjob": "^0.2.1", "hubot-diagnostics": "0.0.1", diff --git a/packages/prathu-reaction/src/currentMood.js b/packages/prathu-reaction/src/currentMood.js index 8f4b843..6a04f79 100644 --- a/packages/prathu-reaction/src/currentMood.js +++ b/packages/prathu-reaction/src/currentMood.js @@ -1,7 +1,7 @@ module.exports = (app, options = {}) => { const { moodSupplier } = options; - app.get('/plugin/reaction/current-mood', (req, res) => { + app.get('/current-mood', (req, res) => { res.end(` @@ -10,7 +10,7 @@ module.exports = (app, options = {}) => { `); }); - app.get('/plugin/reaction/current-mood.json', (req, res) => { + app.get('/current-mood.json', (req, res) => { res.send({ mood: moodSupplier() }) diff --git a/packages/prathu-reaction/src/currentMood.test.js b/packages/prathu-reaction/src/currentMood.test.js index 14048f3..542ce36 100644 --- a/packages/prathu-reaction/src/currentMood.test.js +++ b/packages/prathu-reaction/src/currentMood.test.js @@ -15,7 +15,7 @@ describe('currentMood', () => { }); it('should display html', async () => { - await request.get('/plugin/reaction/current-mood') + await request.get('/current-mood') .expect(200, /prathu-reaction/) }); @@ -35,7 +35,7 @@ describe('currentMood', () => { let request = supertest(app); - await request.get('/plugin/reaction/current-mood.json') + await request.get('/current-mood.json') .expect(200, { mood })