Skip to content

Commit

Permalink
handle server error in rsvp
Browse files Browse the repository at this point in the history
  • Loading branch information
rampatra committed Feb 8, 2020
1 parent c6ef137 commit cab83a3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
5 changes: 3 additions & 2 deletions README.md
Expand Up @@ -8,8 +8,9 @@ _See [wedding.rampatra.com](http://wedding.rampatra.com/) for a demo. Use invite
3. __Receive email alerts__ when someone RSVPs.
4. __Add to Calendar__ feature which supports four different calendars.
5. __Book Uber__ button lets guests book a cab to the venue with just a single tap.
6. Start and run the website __completely free__. No hosting, backend server, or database required as you can
use [GitHub pages](https://pages.github.com/) to host and Google sheets (with the help of Google scripts) to store rsvp data.
6. Start and run the website __completely free__. No hosting, backend server, or database required as you can use
[GitHub Pages](https://pages.github.com/) to host and Google sheets (with the help of Google scripts) to store rsvp
data.

# Getting Started
1. `$ cd wedding-website` - go inside the project directory
Expand Down
8 changes: 6 additions & 2 deletions js/scripts.js
Expand Up @@ -221,8 +221,12 @@ $(document).ready(function () {
$.post('https://script.google.com/macros/s/AKfycbzUqz44wOat0DiGjRV1gUnRf4HRqlRARWggjvHKWvqniP7eVDG-/exec', data)
.done(function (data) {
console.log(data);
$('#alert-wrapper').html('');
$('#rsvp-modal').modal('show');
if (data.result === "error") {
$('#alert-wrapper').html(alert_markup('danger', data.message));
} else {
$('#alert-wrapper').html('');
$('#rsvp-modal').modal('show');
}
})
.fail(function (data) {
console.log(data);
Expand Down
2 changes: 1 addition & 1 deletion js/scripts.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "wedding-website",
"version": "1.0.0",
"version": "1.0.1",
"description": "A wedding website with loads of features.",
"main": "npmfile.js",
"scripts": {
Expand Down

0 comments on commit cab83a3

Please sign in to comment.