status to statusCode

This commit is contained in:
Roee Gadot 2021-04-27 10:25:02 +03:00
parent d715473088
commit b886af2242
2 changed files with 14 additions and 15 deletions

View File

@ -24,13 +24,13 @@ func GetEntries(c *fiber.Ctx) error {
baseEntries := make([]models.BaseEntryDetails, 0)
for _, entry := range entries {
baseEntries = append(baseEntries, models.BaseEntryDetails{
Id: entry.EntryId,
Url: entry.Url,
Service: entry.Service,
Path: entry.Path,
Status: entry.Status,
Method: entry.Method,
Timestamp: entry.Timestamp,
Id: entry.EntryId,
Url: entry.Url,
Service: entry.Service,
Path: entry.Path,
StatusCode: entry.Status,
Method: entry.Method,
Timestamp: entry.Timestamp,
})
}
@ -40,7 +40,6 @@ func GetEntries(c *fiber.Ctx) error {
})
}
func GetEntry(c *fiber.Ctx) error {
var entryData models.EntryData
database.GetEntriesTable().

View File

@ -18,13 +18,13 @@ type MizuEntry struct {
}
type BaseEntryDetails struct {
Id string `json:"id,omitempty"`
Url string `json:"url,omitempty"`
Service string `json:"service,omitempty"`
Path string `json:"path,omitempty"`
Status int `json:"status,omitempty"`
Method string `json:"method,omitempty"`
Timestamp int64 `json:"timestamp,omitempty"`
Id string `json:"id,omitempty"`
Url string `json:"url,omitempty"`
Service string `json:"service,omitempty"`
Path string `json:"path,omitempty"`
StatusCode int `json:"statusCode,omitempty"`
Method string `json:"method,omitempty"`
Timestamp int64 `json:"timestamp,omitempty"`
}
type EntryData struct {