Skip to content

Commit

Permalink
refactor: use even more Object.entries
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Jul 9, 2022
1 parent 5f84931 commit 76582e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/events/http/Endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { fileURLToPath } from 'node:url'
import { log } from '@serverless/utils/log.js'
import OfflineEndpoint from './OfflineEndpoint.js'

const { keys } = Object
const { entries } = Object

const __dirname = dirname(fileURLToPath(import.meta.url))

Expand Down Expand Up @@ -54,8 +54,8 @@ export default class Endpoint {
) {
const templatesConfig = this.#http.request.template

keys(templatesConfig).forEach((key) => {
fep.requestTemplates[key] = templatesConfig[key]
entries(templatesConfig).forEach(([key, value]) => {
fep.requestTemplates[key] = value
})
}
// load request template if exists if not use default from serverless offline
Expand Down

0 comments on commit 76582e0

Please sign in to comment.