Skip to content

Commit

Permalink
Revert "Add support GET request too for CK"
Browse files Browse the repository at this point in the history
This reverts commit 6f0c722.
  • Loading branch information
norkans7 committed Feb 19, 2018
1 parent 6f0c722 commit 4cfe2bf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
5 changes: 0 additions & 5 deletions handlers/chikka/chikka.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ func init() {
// Initialize is called by the engine once everything is loaded
func (h *handler) Initialize(s courier.Server) error {
h.SetServer(s)
err := s.AddHandlerRoute(h, http.MethodGet, "receive", h.ReceiveMessage)
if err != nil {
return err
}

return s.AddHandlerRoute(h, http.MethodPost, "receive", h.ReceiveMessage)
}

Expand Down
4 changes: 0 additions & 4 deletions handlers/chikka/chikka_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,9 @@ var testCases = []ChannelHandleTestCase{
{Label: "Receive Valid", URL: receiveURL, Data: validReceive, Status: 200, Response: "Message Accepted",
Text: Sp("Hello World"), URN: Sp("tel:+639178020779"), ExternalID: Sp("4004"),
Date: Tp(time.Date(2016, 03, 11, 04, 20, 59, 690000128, time.UTC))},
{Label: "Receive Valid via GET", URL: receiveURL + "?" + validReceive, Status: 200, Response: "Message Accepted",
Text: Sp("Hello World"), URN: Sp("tel:+639178020779"), ExternalID: Sp("4004"),
Date: Tp(time.Date(2016, 03, 11, 04, 20, 59, 690000128, time.UTC))},

{Label: "Ignore Invalid message_type", URL: receiveURL, Data: "message_type=invalid", Status: 200, Response: "unknown message_type request"},
{Label: "Status Sent Valid", URL: receiveURL, Data: validSentStatus, Status: 200, Response: `"status":"S"`},
{Label: "Status Sent Valid via GET", URL: receiveURL + "?" + validSentStatus, Status: 200, Response: `"status":"S"`},
{Label: "Status Failed Valid", URL: receiveURL, Data: validFailedStatus, Status: 200, Response: `"status":"F"`},
{Label: "Status Invalid", URL: receiveURL, Data: invalidStatus, Status: 400, Response: `must be either 'SENT' or 'FAILED'`},
}
Expand Down

0 comments on commit 4cfe2bf

Please sign in to comment.