diff --git a/packages/data/db.go b/packages/data/db.go index 73cf515..1772ea9 100644 --- a/packages/data/db.go +++ b/packages/data/db.go @@ -115,7 +115,7 @@ func (db *DB) WriteBriefing(b *types.Briefing) error { return nil } -func (db *DB) ReadAll() ([]*types.Briefing, error) { +func (db *DB) ReadAllBriefings() ([]*types.Briefing, error) { bs := make([]*types.Briefing, 0) rows, err := db.Query("SELECT * FROM " + db.Name) diff --git a/packages/server/server.go b/packages/server/server.go index e94937e..ae31c47 100644 --- a/packages/server/server.go +++ b/packages/server/server.go @@ -23,7 +23,7 @@ type questionData struct { func DisplayTable(db *data.DB) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - bs, err := db.ReadAll() + bs, err := db.ReadAllBriefings() if err != nil { _ = fmt.Errorf("DisplayTable: %v\n", err) } @@ -91,7 +91,7 @@ func SubmitForm(db *data.DB, i, j *int64) http.HandlerFunc { log.Println(b) db.WriteBriefing(b) - bs, err := db.ReadAll() + bs, err := db.ReadAllBriefings() if err != nil { _ = fmt.Errorf("SubmitForm: db.ReadAll(): %v\n", err) }