go-urlsh/internal/db/interactions.go

15 lines
265 B
Go
Raw Permalink Normal View History

2024-09-30 13:19:01 +02:00
package db
import (
"context"
"github.com/uptrace/bun"
)
func InsertIntoDB(db *bun.DB, thing any) error {
_, err := db.NewInsert().Model(&thing).Exec(context.Background())
if err != nil {
t.Fatalf("Couldn't insert test mfa config into DB: %q\n", err)
}
}