mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
refactor: Replace _.toUpper(string) with string.toUpperCase (#7808)
This commit is contained in:
parent
b5feb2ff67
commit
22a4ed27e2
@ -220,9 +220,9 @@ class Utils {
|
||||
if (_.has(event, 'http.authorizer')) {
|
||||
if (
|
||||
(_.isString(event.http.authorizer) &&
|
||||
_.toUpper(event.http.authorizer) === 'AWS_IAM') ||
|
||||
event.http.authorizer.toUpperCase() === 'AWS_IAM') ||
|
||||
(event.http.authorizer.type &&
|
||||
_.toUpper(event.http.authorizer.type) === 'AWS_IAM')
|
||||
event.http.authorizer.type.toUpperCase() === 'AWS_IAM')
|
||||
) {
|
||||
hasIAMAuthorizer = true;
|
||||
}
|
||||
@ -235,7 +235,7 @@ class Utils {
|
||||
|
||||
if (
|
||||
(_.isString(event.http.authorizer) &&
|
||||
_.toUpper(event.http.authorizer) !== 'AWS_IAM' &&
|
||||
event.http.authorizer.toUpperCase() !== 'AWS_IAM' &&
|
||||
!awsArnRegExs.cognitoIdpArnExpr.test(event.http.authorizer)) ||
|
||||
event.http.authorizer.name ||
|
||||
(event.http.authorizer.arn &&
|
||||
|
||||
@ -82,9 +82,10 @@ module.exports = {
|
||||
},
|
||||
});
|
||||
} else if (type === 'HTTP' || type === 'HTTP_PROXY') {
|
||||
const integrationHttpMethod = (http.request && http.request.method) || http.method;
|
||||
Object.assign(integration, {
|
||||
Uri: http.request && http.request.uri,
|
||||
IntegrationHttpMethod: _.toUpper((http.request && http.request.method) || http.method),
|
||||
IntegrationHttpMethod: integrationHttpMethod.toUpperCase(),
|
||||
});
|
||||
if (http.connectionType) {
|
||||
Object.assign(integration, {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user