diff --git a/models/log_action.go b/models/log_action.go index aa2051f..50610cc 100644 --- a/models/log_action.go +++ b/models/log_action.go @@ -30,6 +30,7 @@ func logAction(actionType ActionType, user *User, itemID int64) (err error) { return } +// GetAllLogs returns an array with all logs func GetAllLogs() (logs []UserLog, err error) { err = x.OrderBy("id DESC").Find(&logs) if err != nil { diff --git a/routes/api/v1/logs.go b/routes/api/v1/logs.go index 3bdf361..6614e06 100644 --- a/routes/api/v1/logs.go +++ b/routes/api/v1/logs.go @@ -6,6 +6,7 @@ import ( "net/http" ) +// ShowLogs handels viewing logs func ShowLogs(c echo.Context) error { // Check if the user is admin