From 76582e06b72ea0d5c26899f574d8962c7d47d5c6 Mon Sep 17 00:00:00 2001 From: Daniel Nalborczyk Date: Fri, 8 Jul 2022 22:25:09 -0400 Subject: [PATCH] refactor: use even more Object.entries --- src/events/http/Endpoint.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/events/http/Endpoint.js b/src/events/http/Endpoint.js index ff812f081..3d088beeb 100644 --- a/src/events/http/Endpoint.js +++ b/src/events/http/Endpoint.js @@ -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)) @@ -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