From 4aeba35d170c3bb51058f9a261e171cbbd60860d Mon Sep 17 00:00:00 2001 From: Tom Coupland Date: Thu, 20 Sep 2018 11:51:26 +0100 Subject: [PATCH] Unwrap log response (#1232) Currently, the log response is not compatible with the swagger document. This change removes the log wrapper that the old version required. --- api/server/call_logs.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/api/server/call_logs.go b/api/server/call_logs.go index d29c61017..0fec1fad1 100644 --- a/api/server/call_logs.go +++ b/api/server/call_logs.go @@ -27,11 +27,10 @@ type callLog struct { func writeJSON(c *gin.Context, callID string, logReader io.Reader) { var b bytes.Buffer b.ReadFrom(logReader) - c.JSON(http.StatusOK, callLogResponse{"Successfully loaded log", - &callLog{ - CallID: callID, - Log: b.String(), - }}) + c.JSON(http.StatusOK, &callLog{ + CallID: callID, + Log: b.String(), + }) } func (s *Server) handleCallLogGet(c *gin.Context) {