From e8e798d95f5bd2134df3802fd71c3cdfd8284584 Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Mon, 7 Aug 2023 21:56:51 -0400 Subject: [PATCH] basic form setup and response messaging --- src/api/greeting.js | 1 - src/pages/index.html | 2 +- src/services/message.js | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/api/greeting.js b/src/api/greeting.js index dd51d31..ead7766 100644 --- a/src/api/greeting.js +++ b/src/api/greeting.js @@ -1,7 +1,6 @@ import { getMessage } from '../services/message.js'; export async function handler(request) { - console.log({ request }); const params = new URLSearchParams(request.url.slice(request.url.indexOf('?'))); const name = params.has('name') ? params.get('name') : 'Greenwood'; const body = getMessage(name); diff --git a/src/pages/index.html b/src/pages/index.html index 71da708..eaa0af1 100644 --- a/src/pages/index.html +++ b/src/pages/index.html @@ -43,7 +43,7 @@

Greeting API

> diff --git a/src/services/message.js b/src/services/message.js index 08b7b2e..53ffeb4 100644 --- a/src/services/message.js +++ b/src/services/message.js @@ -1,5 +1,5 @@ function getMessage(name) { - return `Hello ${name}!`; + return `Hello ${name}! 👋`; } export {