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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user