tangled
alpha
login
or
join now
moth11.net
/
88x31
0
fork
atom
tiny 88x31 lexicon for atproto
0
fork
atom
overview
issues
pulls
pipelines
lol
moth11.net
1 month ago
83c5676c
4633b7d4
+3
-2
1 changed file
expand all
collapse all
unified
split
handler
button.go
+3
-2
handler/button.go
···
32
32
http.Error(w, "error getting buttons!", http.StatusInternalServerError)
33
33
return
34
34
}
35
35
-
encoder := json.NewEncoder(w)
36
35
type Resp struct {
37
36
BtnViews []types.ButtonView `json:"button"`
38
37
Cursor *time.Time `json:"cursor,omitempty"`
···
45
44
myresp.BtnViews = btnViews
46
45
myresp.Cursor = ncursor
47
46
}
48
48
-
err = encoder.Encode(btnViews)
47
47
+
w.Header().Set("Content-Type", "application/json")
48
48
+
encoder := json.NewEncoder(w)
49
49
+
err = encoder.Encode(myresp)
49
50
if err != nil {
50
51
log.Println(err)
51
52
http.Error(w, "error encoding response", http.StatusInternalServerError)