From 7906942506c1b6cf4582fb62356dafa4b8cc6780 Mon Sep 17 00:00:00 2001 From: TCatlyn <49073639+TCatlyn@users.noreply.github.com> Date: Sat, 1 Apr 2023 22:08:36 +0200 Subject: [PATCH 1/2] Update guestbook.js --- guestbook.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guestbook.js b/guestbook.js index 22363fbc..a281a546 100644 --- a/guestbook.js +++ b/guestbook.js @@ -1,13 +1,13 @@ /** * Web application */ -const apiUrl = ''; +const apiUrl = 'https://us-south.functions.appdomain.cloud/api/v1/web/53554981-4869-4ab1-b5b2-6c5b8871d007/guestbook'; const guestbook = { // retrieve the existing guestbook entries get() { return $.ajax({ type: 'GET', - url: `${apiUrl}/entries`, + url: `${apiUrl}/read-guestbook-entries-sequence`, dataType: 'json' }); }, @@ -16,7 +16,7 @@ const guestbook = { console.log('Sending', name, email, comment) return $.ajax({ type: 'PUT', - url: `${apiUrl}/entries`, + url: `${apiUrl}/save-guestbook-entry-sequence`, contentType: 'application/json; charset=utf-8', data: JSON.stringify({ name, From 23142036a2f56bcfa381a4d5c0585845ac5da20d Mon Sep 17 00:00:00 2001 From: TCatlyn <49073639+TCatlyn@users.noreply.github.com> Date: Sun, 2 Apr 2023 17:53:14 +0200 Subject: [PATCH 2/2] Update guestbook.js --- guestbook.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guestbook.js b/guestbook.js index a281a546..64a7ef91 100644 --- a/guestbook.js +++ b/guestbook.js @@ -7,7 +7,7 @@ const guestbook = { get() { return $.ajax({ type: 'GET', - url: `${apiUrl}/read-guestbook-entries-sequence`, + url: `${apiUrl}/read-guestbook-entries-sequence.json`, dataType: 'json' }); }, @@ -16,7 +16,7 @@ const guestbook = { console.log('Sending', name, email, comment) return $.ajax({ type: 'PUT', - url: `${apiUrl}/save-guestbook-entry-sequence`, + url: `${apiUrl}/save-guestbook-entry-sequence.json`, contentType: 'application/json; charset=utf-8', data: JSON.stringify({ name,