Skip to content

Commit 663685b

Browse files
committed
commit outstanding
1 parent b60717a commit 663685b

File tree

6 files changed

+9
-3
lines changed

6 files changed

+9
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
env.sh

api/main.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ func (h *RequestHandler) WhatsappResponseHandler(w http.ResponseWriter, r *http.
189189
if err != nil {
190190
log.Print("Sending Whatsapp Error message")
191191
whatsapp.GetWhatsappClient().SendMessage(fromPhone, "Unable to create reminder; unrecognized request format.")
192-
http.Error(w, "Unrecognized reminder request format.", http.StatusBadRequest)
192+
// http.Error(w, "Unrecognized reminder request format.", http.StatusBadRequest)
193+
w.WriteHeader(http.StatusOK)
193194
} else {
194195
w.WriteHeader(http.StatusOK)
195196
makeReminderResponse(w, reminderInfo)

env

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FB_VERIFY_TOKEN=test
2+
WHATSAPP_ACCOUNT_ID=102925089154632
3+
WHATSAPP_TOKEN=EAAZAWLMCDNC0BACAIW3PpCEOUyr3jtUKlJUxK9dmEdt5nH699fyCMRW08DfgaUWt3VlUHuRHxkb0GvJNMZB3VSEpqB10u0KQI6WkMa1ZANtaUDkjW5oXY0NkYlpcAE6YUyeeg6QJte3BgyRqJuFzHyHOqTH9zphQaPPd4Ex68rr5eythIbhfchZAb2lFSCCmYMs95iyzKcwZCBqTLULId

env.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
FB_VERIFY_TOKEN=
2-
WHATSAPP_ACCOUNT_ID=
31
WHATSAPP_TOKEN=
2+
FB_VERIFY_TOKEN=test
3+
WHATSAPP_ACCOUNT_ID=102925089154632

ngrok

19.9 MB
Binary file not shown.

parse.go

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ func ParseUpdateReminderMessage(message string) (string, int, error) {
5353
referenceId = result["referenceId"]
5454
messageTime := result["time"]
5555
nMinutes, err = getReminderNMinutesFromMessage(messageTime)
56+
fmt.Printf("messageTime=%s nMinutes=%d", messageTime, nMinutes)
5657
return referenceId, nMinutes, err
5758
}
5859

0 commit comments

Comments
 (0)