Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

guestbook update #65

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
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/dcc1c247-3b5c-4dea-a229-43721ec675f6/guestbook';
const guestbook = {
// retrieve the existing guestbook entries
get() {
return $.ajax({
type: 'GET',
url: `${apiUrl}/entries`,
url: `${apiUrl}/read-guestbook-entries-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