fix cost
This commit is contained in:
parent
393bc77655
commit
1ded95c813
@ -27,7 +27,7 @@ func Response(ctx *gin.Context, code interface{}, message string, data interface
|
|||||||
"message": message,
|
"message": message,
|
||||||
"data": data,
|
"data": data,
|
||||||
"trace_id": ctx.GetString("trace_id"),
|
"trace_id": ctx.GetString("trace_id"),
|
||||||
"cost": time.Since(time.Unix(ctx.GetInt64("start_time"), 0)).Milliseconds(),
|
"cost": time.Now().UnixMilli() - ctx.GetInt64("start_time"),
|
||||||
}
|
}
|
||||||
ctx.JSON(http.StatusOK, responseData)
|
ctx.JSON(http.StatusOK, responseData)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user