refactor: general architectural cleanup and bug fixes

This commit is contained in:
2026-05-13 11:20:49 +02:00
parent 1b88c4597c
commit 345853406c
34 changed files with 274 additions and 102 deletions

View File

@@ -25,7 +25,7 @@ type Client struct {
lastReqTime time.Time // rate limiting: last request timestamp
}
func NewClient(db db.Querier) *Client {
func NewClient(queries *db.Queries) *Client {
return &Client{
httpClient: &http.Client{
Timeout: 10 * time.Second,
@@ -37,7 +37,7 @@ func NewClient(db db.Querier) *Client {
},
},
baseURL: "https://api.jikan.moe/v4",
db: db,
db: queries,
retrySignal: make(chan struct{}, 1),
}
}

View File

@@ -1,8 +1,6 @@
package jikan
import (
"mal/internal/db"
"go.uber.org/fx"
)