mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-08-02 00:57:45 +00:00
fix GetEntrties ("/entries" endpoint) - working with "tapApi.BaseEntryDetail" (moved from shared)
This commit is contained in:
parent
4f514ae1f4
commit
f2024a314d
@ -52,16 +52,16 @@ func GetEntries(c *gin.Context) {
|
||||
utils.ReverseSlice(entries)
|
||||
}
|
||||
|
||||
// baseEntries := make([]models.BaseEntryDetails, 0)
|
||||
// for _, data := range entries {
|
||||
// harEntry := models.BaseEntryDetails{}
|
||||
// if err := models.GetEntry(&data, &harEntry); err != nil {
|
||||
// continue
|
||||
// }
|
||||
// baseEntries = append(baseEntries, harEntry)
|
||||
// }
|
||||
baseEntries := make([]tapApi.BaseEntryDetails, 0)
|
||||
for _, data := range entries {
|
||||
harEntry := tapApi.BaseEntryDetails{}
|
||||
if err := models.GetEntry(&data, &harEntry); err != nil {
|
||||
continue
|
||||
}
|
||||
baseEntries = append(baseEntries, harEntry)
|
||||
}
|
||||
|
||||
// c.JSON(http.StatusOK, baseEntries)
|
||||
c.JSON(http.StatusOK, baseEntries)
|
||||
}
|
||||
|
||||
func GetHARs(c *gin.Context) {
|
||||
|
Loading…
Reference in New Issue
Block a user