Skip to content

Commit 18e0408

Browse files
Merge pull request #930 from jboolean/dependabot/npm_and_yarn/backend/types/express-4.17.21
Bump @types/express from 4.17.14 to 4.17.21 in /backend
2 parents 2f2525f + 1789a8e commit 18e0408

File tree

5 files changed

+52
-35
lines changed

5 files changed

+52
-35
lines changed

backend/package-lock.json

Lines changed: 49 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"@types/cors": "^2.8.12",
2525
"@types/eslint": "^8.44.3",
2626
"@types/eslint-plugin-prettier": "^3.1.0",
27-
"@types/express": "^4.17.14",
27+
"@types/express": "^4.17.21",
2828
"@types/geojson": "^7946.0.10",
2929
"@types/http-errors": "^2.0.1",
3030
"@types/jsonstream": "^0.8.31",

backend/src/api/AuthenticationController.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,10 @@ export class AuthenticationController extends Controller {
5656
): Promise<LoginResponse> {
5757
const userId = await getUserFromRequestOrCreateAndSetCookie(req);
5858
const { requestedEmail, returnToPath, requireVerifiedEmail } = loginRequest;
59-
const ipAddress = req.ip;
6059
const apiBase = `${req.protocol}://${required(req.get('host'), 'host')}`;
6160
const result = await UserService.processLoginRequest(
6261
requestedEmail,
6362
userId,
64-
ipAddress,
6563
apiBase,
6664
returnToPath,
6765
requireVerifiedEmail

backend/src/api/auth/userAuthUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as UserService from '../../business/users/UserService';
21
import * as express from 'express';
2+
import * as UserService from '../../business/users/UserService';
33
import { setAuthCookie } from './authCookieUtils';
44

55
export const USER_TOKEN_COOKIE = 'user-token';
@@ -25,7 +25,7 @@ export async function getUserFromRequestOrCreateAndSetCookie(
2525
}
2626

2727
if (!token || !userId) {
28-
const userCreationResult = await UserService.createUser(req.ip);
28+
const userCreationResult = await UserService.createUser(req.ip as string);
2929
userId = userCreationResult.userId;
3030
token = userCreationResult.token;
3131
}

backend/src/business/users/UserService.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ async function sendMagicLink(
150150
export async function processLoginRequest(
151151
requestedEmail: string,
152152
authenticatedUserId: number,
153-
ipAddress: string,
154153
apiBase: string,
155154
returnToPath?: string,
156155
requireVerifiedEmail = false

0 commit comments

Comments
 (0)