fix: replaced invalid refrences to libs and typos
This commit is contained in:
@@ -12,9 +12,9 @@ import (
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/google/uuid"
|
||||
"github.com/jackc/pgx/v5"
|
||||
"github.com/yourname/deflated/internal/db"
|
||||
"github.com/yourname/deflated/internal/models"
|
||||
"github.com/yourname/deflated/internal/parser"
|
||||
"git.seaofstars.xyz/mohd/deflated/internal/db"
|
||||
"git.seaofstars.xyz/mohd/deflated/internal/models"
|
||||
"git.seaofstars.xyz/mohd/deflated/internal/parser"
|
||||
)
|
||||
|
||||
// handlers holds shared dependencies (database, future: storage client, etc.)
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/go-chi/chi/v5/middleware"
|
||||
"github.com/go-chi/cors"
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
"github.com/yourname/deflated/internal/db"
|
||||
"git.seaofstars.xyz/mohd/deflated/internal/db"
|
||||
)
|
||||
|
||||
// NewRouter builds the full Chi router with middleware and all routes.
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
"github.com/go-chi/chi/v5"
|
||||
|
||||
"github.com/yourname/deflated/internal/db"
|
||||
"git.seaofstars.xyz/mohd/deflated/internal/db"
|
||||
)
|
||||
|
||||
// ItemHandler handles routes that return price and inflation data.
|
||||
|
||||
@@ -14,8 +14,8 @@ import (
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/google/uuid"
|
||||
|
||||
"github.com/yourname/deflated/internal/db"
|
||||
"github.com/yourname/deflated/internal/inflation"
|
||||
"git.seaofstars.xyz/mohd/deflated/internal/db"
|
||||
"git.seaofstars.xyz/mohd/deflated/internal/inflation"
|
||||
)
|
||||
|
||||
// ReceiptHandler handles HTTP requests related to receipt submissions.
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"github.com/yourname/deflated/internal/db"
|
||||
"git.seaofstars.xyz/mohd/deflated/internal/db"
|
||||
)
|
||||
|
||||
// StartRefreshWorker runs in a goroutine and refreshes price snapshots
|
||||
@@ -36,7 +36,8 @@ func StartRefreshWorker(ctx context.Context, q *db.Queries, interval time.Durati
|
||||
|
||||
func runRefresh(ctx context.Context, q *db.Queries) {
|
||||
start := time.Now()
|
||||
if err := q.RefreshPriceSnapshots(ctx); err != nil {
|
||||
// using RebuildSnapshots instead of refreshsnapshots for now
|
||||
if err := q.RebuildSnapshots(ctx); err != nil {
|
||||
log.Printf("error refreshing price snapshots: %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user