Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions guestbook.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/**
* Web application
*/
const apiUrl = '';
const apiUrl = 'https://us-south.functions.appdomain.cloud/api/v1/web/ca1c0d47-564a-4e5b-85d2-e2504b9f17aa/default';
const guestbook = {
// retrieve the existing guestbook entries
get() {
return $.ajax({
type: 'GET',
url: `${apiUrl}/entries`,
url: `${apiUrl}/read-guestbook-entry-sequence.json`,
dataType: 'json'
});
},
Expand All @@ -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.json`,
contentType: 'application/json; charset=utf-8',
data: JSON.stringify({
name,
Expand Down