Skip to content

Commit

Permalink
feat: update api path and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
germanattanasio committed Mar 19, 2019
1 parent 451d64f commit 2c132bc
Show file tree
Hide file tree
Showing 6 changed files with 781 additions and 169 deletions.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ if (process.env.SPEECH_TO_TEXT_IAM_APIKEY && process.env.SPEECH_TO_TEXT_IAM_APIK
app.get('/', (req, res) => res.render('index'));

// Get credentials using your credentials
app.get('/api/credentials', (req, res, next) => {
app.get('/api/v1/credentials', (req, res, next) => {
tokenManager.getToken((err, token) => {
if (err) {
next(err);
Expand Down
2 changes: 1 addition & 1 deletion config/security.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = (app) => {
app.use(helmet());

// 5. rate limiting.
app.use('/api/', rateLimit({
app.use('/api/v1/', rateLimit({
windowMs: 30 * 1000, // 30 seconds
delayMs: 0,
max: 3,
Expand Down
Loading

0 comments on commit 2c132bc

Please sign in to comment.