Skip to content

Commit

Permalink
Changing current-mood to the root
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjpaz committed Nov 17, 2018
1 parent bd05053 commit e4f0c25
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/hubot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/prathu-reaction/src/currentMood.js
Original file line number Diff line number Diff line change
@@ -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(`
<html>
<body id='prathu-reaction'>
Expand All @@ -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()
})
Expand Down
4 changes: 2 additions & 2 deletions packages/prathu-reaction/src/currentMood.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
});

Expand All @@ -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
})
Expand Down

0 comments on commit e4f0c25

Please sign in to comment.