add storage interface, fix all references

This commit is contained in:
nkanaev
2026-06-10 22:24:04 +01:00
parent 3f10371975
commit f2556178b3
9 changed files with 65 additions and 57 deletions

View File

@@ -11,6 +11,7 @@ import (
"testing"
"github.com/nkanaev/yarr/src/storage"
"github.com/nkanaev/yarr/src/storage/model"
)
func TestStatic(t *testing.T) {
@@ -79,8 +80,8 @@ func TestFeedIcons(t *testing.T) {
log.SetOutput(io.Discard)
db, _ := storage.New(":memory:")
icon := []byte("test")
feed := db.CreateFeed(storage.CreateFeedParams{})
db.UpdateFeed(feed.Id, storage.UpdateFeedParams{Icon: storage.SetNullable(&icon)})
feed := db.CreateFeed(model.CreateFeedParams{})
db.UpdateFeed(feed.Id, model.UpdateFeedParams{Icon: model.SetNullable(&icon)})
log.SetOutput(os.Stderr)
recorder := httptest.NewRecorder()