Skip to content

Commit

Permalink
Merge pull request #65 from duboisp/apps68
Browse files Browse the repository at this point in the history
APPS-68 - Make the topics stats reachable
  • Loading branch information
duboisp authored Oct 21, 2020
2 parents 1edc078 + ca22d65 commit c86d9e6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .env-example
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ LOG_FORMAT=dev

# +++++
# BasicAuth
user=<username>
password=<password>
user=username
password=password

keySalt=salt
validHosts=["localhost:8080"]
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ COPY . .

WORKDIR ./x-notify/

COPY ./.env-example ./.env

CMD [ "npm", "start" ]
6 changes: 3 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ MongoClient.connect( processEnv.MONGODB_URI || '', {useUnifiedTopology: true} ).
/**
* Manager routes.
*/
app.get('/api/v0.1/t-manager/:topicId/stats',
passport.authenticate('basic', { session: false }),
managersController.getTopicStats);
app.get('/api/v0.1/t-manager/:accessCode/home',
passport.authenticate('basic', { session: false }),
managersController.serveHome);
Expand Down Expand Up @@ -158,9 +161,6 @@ MongoClient.connect( processEnv.MONGODB_URI || '', {useUnifiedTopology: true} ).
app.get('/api/v0.1/t-manager/:accessCode/:topicId/bulk/form',
passport.authenticate('basic', { session: false }),
managersController.serveBulkForm);
app.get('/api/v0.1/t-manager/:topicId/stats',
passport.authenticate('basic', { session: false }),
managersController.getTopicStats);
app.post('/api/v0.1/t-manager/:accessCode/:topicId/bulk/action',
passport.authenticate('basic', { session: false }),
bodyParser.urlencoded({extended:true, limit: '50mb'}),
Expand Down

0 comments on commit c86d9e6

Please sign in to comment.