fix: replaced invalid refrences to libs and typos

This commit is contained in:
2026-05-03 19:32:47 +03:00
parent 2e292add12
commit 105c1a8870
7 changed files with 56 additions and 10 deletions
+3 -3
View File
@@ -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.)
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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.
+2 -2
View File
@@ -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.
+3 -2
View File
@@ -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
}