mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Removes "type" from json format. Was pointless. (#783)
This commit is contained in:
committed by
Reed Allman
parent
cebae57007
commit
575e1d3d0c
@@ -30,7 +30,6 @@ type CallResponseHTTP struct {
|
||||
// jsonIn We're not using this since we're writing JSON directly right now, but trying to keep it current anyways, much easier to read/follow
|
||||
type jsonIn struct {
|
||||
CallID string `json:"call_id"`
|
||||
Type string `json:"type"`
|
||||
Deadline string `json:"deadline"`
|
||||
Body string `json:"body"`
|
||||
ContentType string `json:"content_type"`
|
||||
@@ -71,7 +70,6 @@ func (h *JSONProtocol) writeJSONToContainer(ci CallInfo) error {
|
||||
Body: body,
|
||||
ContentType: ci.ContentType(),
|
||||
CallID: ci.CallID(),
|
||||
Type: ci.CallType(),
|
||||
Deadline: ci.Deadline().String(),
|
||||
Protocol: CallRequestHTTP{
|
||||
Type: ci.ProtocolType(),
|
||||
|
||||
@@ -80,10 +80,6 @@ func TestJSONProtocolwriteJSONInputRequestBasicFields(t *testing.T) {
|
||||
t.Errorf("Request ContentType assertion mismatch: expected: %s, got %s",
|
||||
ci.ContentType(), incomingReq.ContentType)
|
||||
}
|
||||
if incomingReq.Type != ci.CallType() {
|
||||
t.Errorf("Request CallType assertion mismatch: expected: %s, got %s",
|
||||
ci.CallType(), incomingReq.Type)
|
||||
}
|
||||
if incomingReq.Deadline != ci.Deadline().String() {
|
||||
t.Errorf("Request Deadline assertion mismatch: expected: %s, got %s",
|
||||
ci.Deadline(), incomingReq.Deadline)
|
||||
|
||||
Reference in New Issue
Block a user