Replace scs postgresstore with a sqlc-backed SessionStore.

Keep scs for cookies and session API while sessions DDL and queries live in the same sqlc stack as the rest of Postgres.
This commit is contained in:
2026-08-22 07:11:47 -07:00
parent b519cf6fe5
commit 247fb05281
11 changed files with 266 additions and 56 deletions
+3 -3
View File
@@ -99,7 +99,7 @@ func rankedFrom(
func ListHunt(ctx context.Context, db *sql.DB, huntDate, viewerID string) ([]RankedQuestion, error) {
rows, err := sqlc.New(db).ListHunt(ctx, sqlc.ListHuntParams{
UserID: viewerID,
ViewerID: viewerID,
HuntDate: huntDate,
})
if err != nil {
@@ -114,8 +114,8 @@ func ListHunt(ctx context.Context, db *sql.DB, huntDate, viewerID string) ([]Ran
func GetQuestion(ctx context.Context, db *sql.DB, id, viewerID string) (*RankedQuestion, error) {
r, err := sqlc.New(db).GetQuestion(ctx, sqlc.GetQuestionParams{
UserID: viewerID,
ID: id,
ViewerID: viewerID,
ID: id,
})
if err != nil {
return nil, err