Only get the latest 10 trap collections
Otherwise the page gets really swamped
This commit is contained in:
parent
d3b9d34bd2
commit
b7318ae973
12 changed files with 304 additions and 27 deletions
10
database.go
10
database.go
|
|
@ -1,7 +1,6 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"database/sql"
|
||||
"embed"
|
||||
|
|
@ -197,12 +196,3 @@ func updateSummaryTables(ctx context.Context, org *models.Organization) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
func insertQueryToString(query bob.BaseQuery[*dialect.InsertQuery]) string {
|
||||
buf := new(bytes.Buffer)
|
||||
_, err := query.WriteQuery(context.TODO(), buf, 0)
|
||||
if err != nil {
|
||||
return fmt.Sprintf("Failed to write query: %v", err)
|
||||
}
|
||||
return buf.String()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue