From 8eda1a24585ef8fc6d62dec16632c728a7c35c84 Mon Sep 17 00:00:00 2001 From: Ice3man Date: Sun, 18 Dec 2022 19:16:39 +0530 Subject: [PATCH] Fixed list scan endpoint --- v2/internal/runner/cloud.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/v2/internal/runner/cloud.go b/v2/internal/runner/cloud.go index 1b78c979..b35cea20 100644 --- a/v2/internal/runner/cloud.go +++ b/v2/internal/runner/cloud.go @@ -18,7 +18,7 @@ import ( // Get all the scan lists for a user/apikey. func (r *Runner) getScanList(limit int) error { - lastTime := "2099-01-02 1 5:04:05 +0000 UTC" + lastTime := "2099-01-02 15:04:05 +0000 UTC" header := []string{"ID", "Timestamp", "Status", "Matched", "Targets", "Templates", "Duration"} var values [][]string @@ -46,13 +46,16 @@ func (r *Runner) getScanList(limit int) error { } } } + if e != nil { + return e + } if count == 0 { return errors.New("no scan list found") } if !r.options.NoTables { r.prettyPrintTable(header, values) } - return e + return nil } func (r *Runner) listDatasources() error {