Skip to content

Commit

Permalink
unused response parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeautry committed Oct 10, 2018
1 parent 486b17c commit 04fbe19
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/routeGeneration/templates/express.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function RegisterRoutes(app: any) {

{{#if useSecurity}}
function authenticateMiddleware(security: TsoaRoute.Security[] = []) {
return (request: any, response: any, next: any) => {
return (request: any, _response: any, next: any) => {
let responded = 0;
let success = false;

Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/custom/custom-tsoa-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function RegisterRoutes(app: any) {

{{#if useSecurity}}
function authenticateMiddleware(securities: TsoaRoute.Security[] = []) {
return (request: any, response: any, next: any) => {
return (request: any, _response: any, next: any) => {
let responded = 0;
let success = false;
Object.keys(securities)
Expand All @@ -87,7 +87,7 @@ export function RegisterRoutes(app: any) {
.catch((error: any) => {
responded++;
if (responded==securities.length&&!success) {
response.status(401);
_response.status(401);
next(error)
}
})
Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/custom/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1700,7 +1700,7 @@ export function RegisterRoutes(app: any) {
});

function authenticateMiddleware(securities: TsoaRoute.Security[]=[]) {
return (request: any, response: any, next: any) => {
return (request: any, _response: any, next: any) => {
let responded=0;
let success=false;
Object.keys(securities)
Expand All @@ -1717,7 +1717,7 @@ export function RegisterRoutes(app: any) {
.catch((error: any) => {
responded++;
if (responded==securities.length&&!success) {
response.status(401);
_response.status(401);
next(error)
}
})
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/express/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2050,7 +2050,7 @@ export function RegisterRoutes(app: any) {
});

function authenticateMiddleware(security: TsoaRoute.Security[]=[]) {
return (request: any, response: any, next: any) => {
return (request: any, _response: any, next: any) => {
let responded=0;
let success=false;

Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/inversify/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export function RegisterRoutes(app: any) {
});

function authenticateMiddleware(security: TsoaRoute.Security[]=[]) {
return (request: any, response: any, next: any) => {
return (request: any, _response: any, next: any) => {
let responded=0;
let success=false;

Expand Down

0 comments on commit 04fbe19

Please sign in to comment.