We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e2c1f7 commit 05a35adCopy full SHA for 05a35ad
2 files changed
internal/api/http.go
@@ -129,8 +129,8 @@ type headOut struct {
129
130
type logOut struct {
131
Body struct {
132
- Head string `json:"head"`
133
- Nodes []protocol.Node `json:"nodes"`
+ Head string `json:"head"`
+ Nodes []protocol.Node `json:"nodes"`
134
}
135
136
@@ -140,8 +140,8 @@ type nodeIDIn struct {
140
141
type showOut struct {
142
143
- Parent string `json:"parent"`
144
- Changes []protocol.Change `json:"changes"`
+ Parent string `json:"parent"`
+ Changes []protocol.Change `json:"changes"`
145
146
147
@@ -198,18 +198,18 @@ type tagsListOut struct {
198
199
type tournamentIn struct {
200
201
- Base string `json:"base" doc:"base ref (default HEAD)"`
202
- Test string `json:"test" required:"true" doc:"test command run inside each candidate"`
203
- Candidates []protocol.TournamentCandidate `json:"candidates" required:"true" minItems:"1"`
+ Base string `json:"base" doc:"base ref (default HEAD)"`
+ Test string `json:"test" required:"true" doc:"test command run inside each candidate"`
+ Candidates []protocol.TournamentCandidate `json:"candidates" required:"true" minItems:"1"`
204
205
206
207
type tournamentOut struct {
208
209
210
- Winner string `json:"winner,omitempty"`
211
- WinnerNode string `json:"winner_node,omitempty"`
212
- Branches []protocol.TournamentBranch `json:"branches"`
+ Winner string `json:"winner,omitempty"`
+ WinnerNode string `json:"winner_node,omitempty"`
+ Branches []protocol.TournamentBranch `json:"branches"`
213
214
215
internal/api/http_test.go
@@ -54,9 +54,9 @@ func TestBearerAuth(t *testing.T) {
54
t.Errorf("%s: got %d, want %d", name, rr.Code, wantStatus)
55
56
57
- check("no-token /v1/head", "GET", "/v1/head", "", 401)
58
- check("wrong-token /v1/head", "GET", "/v1/head", "Bearer nope", 401)
59
- check("right-token /v1/head", "GET", "/v1/head", "Bearer secret", 204)
60
- check("no-token /openapi.json", "GET", "/openapi.json", "", 200)
61
- check("no-token /docs", "GET", "/docs", "", 200)
+ check("no-token /v1/head", "GET", "/v1/head", "", 401)
+ check("wrong-token /v1/head", "GET", "/v1/head", "Bearer nope", 401)
+ check("right-token /v1/head", "GET", "/v1/head", "Bearer secret", 204)
+ check("no-token /openapi.json", "GET", "/openapi.json", "", 200)
+ check("no-token /docs", "GET", "/docs", "", 200)
62
0 commit comments