Fix pagination

Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
gearnode
2025-02-12 14:18:50 -08:00
parent bbc037ad6e
commit 743ec49972
14 changed files with 71 additions and 68 deletions

View File

@@ -22,7 +22,6 @@ import (
"github.com/getprobo/probo/pkg/gid"
"github.com/getprobo/probo/pkg/page"
"github.com/jackc/pgx/v5"
"go.gearno.de/crypto/uuid"
"go.gearno.de/kit/pg"
)
@@ -37,7 +36,7 @@ type (
)
func (s Session) CursorKey() page.CursorKey {
return page.NewCursorKey(uuid.UUID(s.ID), s.CreatedAt)
return page.NewCursorKey(s.ID, s.CreatedAt)
}
func (s *Session) scan(r pgx.Row) error {

View File

@@ -21,7 +21,6 @@ import (
"github.com/getprobo/probo/pkg/gid"
"github.com/getprobo/probo/pkg/page"
"github.com/jackc/pgx/v5"
"go.gearno.de/crypto/uuid"
"go.gearno.de/kit/pg"
)
@@ -36,7 +35,7 @@ type (
)
func (u User) CursorKey() page.CursorKey {
return page.NewCursorKey(uuid.UUID(u.ID), u.CreatedAt)
return page.NewCursorKey(u.ID, u.CreatedAt)
}
func (u *User) scan(r pgx.Row) error {