Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
Bump lodash
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjackgardner committed Jul 8, 2020
1 parent 3db2e3b commit fe27831
Show file tree
Hide file tree
Showing 4 changed files with 487 additions and 319 deletions.
4 changes: 0 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ jobs:
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "yarn.lock" }}
- v1-dependencies-
- run: yarn
- save_cache:
paths:
Expand Down
4 changes: 2 additions & 2 deletions src/routes/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function apiRoutes(runner: Runner, client: BitbucketClient, config: Confi
'/history',
requireAuth('land'),
wrap(async (req, res) => {
const page = parseInt(req.query.page || '0', 10);
const page = parseInt((req.query.page as string) || '0', 10);
const history = await runner.getHistory(page);
Logger.info('Requesting history', { namespace: 'routes:api:history', page });
res.header('Access-Control-Allow-Origin', '*').json(history);
Expand Down Expand Up @@ -227,7 +227,7 @@ export function apiRoutes(runner: Runner, client: BitbucketClient, config: Confi
'/landrequests',
requireAuth('land'),
wrap(async (req, res) => {
const ids = req.query.ids.split(',');
const ids = (req.query.ids as string).split(',');
Logger.verbose('Requesting landrequests', { namespace: 'routes:api:landrequests', ids });
res.json({ statuses: await runner.getStatusesForLandRequests(ids) });
}),
Expand Down
3 changes: 2 additions & 1 deletion src/routes/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ export const authenticateIncomingBBCall: express.RequestHandler = wrap(async (re
error: 'Addon has not been installed, can not be validated',
});
}
let jwt: string | undefined = req.query.jwt || req.header('authorization');
let jwt: string | undefined =
(req.query.jwt as string | undefined) || req.header('authorization');
if (!jwt) {
Logger.error('Authenticated request requires a JWT token', {
namespace: 'routes:middleware:authenticateIncomingBBCall',
Expand Down
Loading

0 comments on commit fe27831

Please sign in to comment.