db.ReadAll zu db.ReadAllBriefings umbenannt, um neue DB-Struktur besser zu representieren

This commit is contained in:
Jason Streifling 2023-10-17 16:36:08 +02:00
parent 664c24974b
commit 230d79c675
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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)
}