Live video on the AT Protocol

oauth: roll back makedb changes

+4 -6
+1 -2
pkg/atproto/atproto_test.go
··· 11 "github.com/bluesky-social/indigo/atproto/identity" 12 "github.com/bluesky-social/indigo/xrpc" 13 "github.com/stretchr/testify/require" 14 - "stream.place/streamplace/pkg/config" 15 "stream.place/streamplace/pkg/log" 16 "stream.place/streamplace/pkg/model" 17 ) ··· 22 defer os.RemoveAll(dir) 23 24 fname := filepath.Join(dir, "db.sqlite") 25 - mod, err := model.MakeDB(fname, &config.CLI{}) 26 require.NoError(t, err) 27 oldResolveIdent := ResolveIdent 28 ResolveIdent = func(ctx context.Context, arg string) (*identity.Identity, error) {
··· 11 "github.com/bluesky-social/indigo/atproto/identity" 12 "github.com/bluesky-social/indigo/xrpc" 13 "github.com/stretchr/testify/require" 14 "stream.place/streamplace/pkg/log" 15 "stream.place/streamplace/pkg/model" 16 ) ··· 21 defer os.RemoveAll(dir) 22 23 fname := filepath.Join(dir, "db.sqlite") 24 + mod, err := model.MakeDB(fname) 25 require.NoError(t, err) 26 oldResolveIdent := ResolveIdent 27 ResolveIdent = func(ctx context.Context, arg string) (*identity.Identity, error) {
+1 -1
pkg/cmd/streamplace.go
··· 277 signer = hwsigner 278 } 279 var rep replication.Replicator = &boring.BoringReplicator{Peers: cli.Peers} 280 - mod, err := model.MakeDB(cli.DBPath, &cli) 281 if err != nil { 282 return err 283 }
··· 277 signer = hwsigner 278 } 279 var rep replication.Replicator = &boring.BoringReplicator{Peers: cli.Peers} 280 + mod, err := model.MakeDB(cli.DBPath) 281 if err != nil { 282 return err 283 }
+1 -1
pkg/model/model.go
··· 96 DeletePAR(id string) error 97 } 98 99 - func MakeDB(dbURL string, cli *config.CLI) (Model, error) { 100 log.Log(context.Background(), "starting database", "dbURL", dbURL) 101 sqliteSuffix := dbURL 102 if dbURL != ":memory:" {
··· 96 DeletePAR(id string) error 97 } 98 99 + func MakeDB(dbURL string) (Model, error) { 100 log.Log(context.Background(), "starting database", "dbURL", dbURL) 101 sqliteSuffix := dbURL 102 if dbURL != ":memory:" {
+1 -2
pkg/model/segment_test.go
··· 7 "time" 8 9 "github.com/stretchr/testify/require" 10 - "stream.place/streamplace/pkg/config" 11 ) 12 13 func TestSegmentCleaner(t *testing.T) { 14 - db, err := MakeDB(":memory:", &config.CLI{}) 15 require.NoError(t, err) 16 // Create a model instance 17 model := db.(*DBModel)
··· 7 "time" 8 9 "github.com/stretchr/testify/require" 10 ) 11 12 func TestSegmentCleaner(t *testing.T) { 13 + db, err := MakeDB(":memory:") 14 require.NoError(t, err) 15 // Create a model instance 16 model := db.(*DBModel)