Update @types/express (#602)

This commit is contained in:
alalamav 2020-03-09 16:06:23 -04:00 committed by GitHub
parent c6435feae5
commit ed9fdd3819
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View file

@ -46,7 +46,7 @@ app.use(express.json());
// Accepts hourly connection metrics and inserts them into BigQuery.
// Request body should contain an HourlyServerMetricsReport.
app.post('/connections', async (req: express.Request, res: express.Response) => {
app.post('/connections', async (req: express.Request, res: express.Response<string>) => {
try {
if (!connections.isValidConnectionMetricsReport(req.body)) {
res.status(400).send('Invalid request');
@ -61,7 +61,7 @@ app.post('/connections', async (req: express.Request, res: express.Response) =>
// Accepts daily feature metrics and inserts them into BigQuery.
// Request body should contain a `DailyFeatureMetricsReport`.
app.post('/features', async (req: express.Request, res: express.Response) => {
app.post('/features', async (req: express.Request, res: express.Response<string>) => {
try {
if (!features.isValidFeatureMetricsReport(req.body)) {
res.status(400).send('Invalid request');

View file

@ -17,7 +17,7 @@ import * as express from 'express';
import {postSentryEventToSalesforce, shouldPostEventToSalesforce} from './post_sentry_event_to_salesforce';
exports.postSentryEventToSalesforce = (req: express.Request, res: express.Response) => {
exports.postSentryEventToSalesforce = (req: express.Request, res: express.Response<string>) => {
if (req.method !== 'POST') {
return res.status(405).send('Method not allowed');
}

View file

@ -8,6 +8,6 @@
"dependencies": {},
"devDependencies": {
"@sentry/types": "^4.4.1",
"@types/express": "^4.0.36"
"@types/express": "^4.17.3"
}
}

View file

@ -295,7 +295,7 @@
"@types/node" "*"
"@types/range-parser" "*"
"@types/express@^4.0.36", "@types/express@^4.17.3":
"@types/express@^4.17.3":
version "4.17.3"
resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.3.tgz#38e4458ce2067873b09a73908df488870c303bd9"
integrity sha512-I8cGRJj3pyOLs/HndoP+25vOqhqWkAZsWMEmq1qXy/b/M3ppufecUwaK2/TVDVxcV61/iSdhykUjQQ2DLSrTdg==