mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
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.
This commit is contained in:
@@ -27,11 +27,10 @@ type callLog struct {
|
|||||||
func writeJSON(c *gin.Context, callID string, logReader io.Reader) {
|
func writeJSON(c *gin.Context, callID string, logReader io.Reader) {
|
||||||
var b bytes.Buffer
|
var b bytes.Buffer
|
||||||
b.ReadFrom(logReader)
|
b.ReadFrom(logReader)
|
||||||
c.JSON(http.StatusOK, callLogResponse{"Successfully loaded log",
|
c.JSON(http.StatusOK, &callLog{
|
||||||
&callLog{
|
CallID: callID,
|
||||||
CallID: callID,
|
Log: b.String(),
|
||||||
Log: b.String(),
|
})
|
||||||
}})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) handleCallLogGet(c *gin.Context) {
|
func (s *Server) handleCallLogGet(c *gin.Context) {
|
||||||
|
|||||||
Reference in New Issue
Block a user