tangled
alpha
login
or
join now
moth11.net
/
88x31
0
fork
atom
tiny 88x31 lexicon for atproto
0
fork
atom
overview
issues
pulls
pipelines
beep
moth11.net
1 month ago
9226aa06
83c5676c
+6
-4
2 changed files
expand all
collapse all
unified
split
db
lexicon.go
handler
button.go
+1
-1
db/lexicon.go
···
128
128
return buttons, postedAt, nil
129
129
}
130
130
131
131
-
func (s *Store) GetButtons(limit int, cursor *string, ctx context.Context) ([]types.ButtonView, *time.Time, error) {
131
131
+
func (s *Store) GetButtons(limit int, cursor *time.Time, ctx context.Context) ([]types.ButtonView, *time.Time, error) {
132
132
query := `
133
133
SELECT
134
134
uri,
+5
-3
handler/button.go
···
22
22
limitI = 1
23
23
}
24
24
cursor := r.URL.Query().Get("cursor")
25
25
-
var cursorptr *string
25
25
+
var cursorptr *time.Time
26
26
if cursor != "" {
27
27
-
cursorptr = &cursor
27
27
+
t, err := time.Parse(time.RFC3339, cursor)
28
28
+
if err == nil {
29
29
+
cursorptr = &t
30
30
+
}
28
31
}
29
29
-
30
32
btnViews, ncursor, err := h.db.GetButtons(limitI, cursorptr, r.Context())
31
33
if err != nil {
32
34
http.Error(w, "error getting buttons!", http.StatusInternalServerError)