Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .codex
Empty file.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ tools/provision/mgconn.toml

# coverage files
coverage
*.test

# Schemathesis
.hypothesis
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/api/endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ func TestUpdate(t *testing.T) {
svcCall := svc.On("Update", mock.Anything, tc.session, mock.Anything).Return(tc.err)
req := testRequest{
client: bs.Client(),
method: http.MethodPut,
method: http.MethodPatch,
url: fmt.Sprintf("%s/%s/clients/configs/%s", bs.URL, domainID, tc.id),
contentType: tc.contentType,
token: tc.token,
Expand Down
10 changes: 5 additions & 5 deletions bootstrap/api/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func MakeHandler(svc bootstrap.Service, authn smqauthn.AuthNMiddleware, reader b
api.EncodeResponse,
opts...), "view").ServeHTTP)

r.Put("/{configID}", otelhttp.NewHandler(kithttp.NewServer(
r.Patch("/{configID}", otelhttp.NewHandler(kithttp.NewServer(
updateEndpoint(svc),
decodeUpdateRequest,
api.EncodeResponse,
Expand All @@ -81,13 +81,13 @@ func MakeHandler(svc bootstrap.Service, authn smqauthn.AuthNMiddleware, reader b
api.EncodeResponse,
opts...), "remove").ServeHTTP)

r.Patch("/certs/{certID}", otelhttp.NewHandler(kithttp.NewServer(
r.Patch("/certs/{configID}", otelhttp.NewHandler(kithttp.NewServer(
updateCertEndpoint(svc),
decodeUpdateCertRequest,
api.EncodeResponse,
opts...), "update_cert").ServeHTTP)

r.Put("/connections/{connID}", otelhttp.NewHandler(kithttp.NewServer(
r.Put("/connections/{configID}", otelhttp.NewHandler(kithttp.NewServer(
updateConnEndpoint(svc),
decodeUpdateConnRequest,
api.EncodeResponse,
Expand Down Expand Up @@ -162,7 +162,7 @@ func decodeUpdateCertRequest(_ context.Context, r *http.Request) (any, error) {
}

req := updateCertReq{
clientID: chi.URLParam(r, "certID"),
clientID: chi.URLParam(r, "configID"),
}
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
return nil, errors.Wrap(apiutil.ErrMalformedRequestBody, err)
Expand All @@ -178,7 +178,7 @@ func decodeUpdateConnRequest(_ context.Context, r *http.Request) (any, error) {

req := updateConnReq{
token: apiutil.ExtractBearerToken(r),
id: chi.URLParam(r, "connID"),
id: chi.URLParam(r, "configID"),
}
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
return nil, errors.Wrap(apiutil.ErrMalformedRequestBody, err)
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type Channel struct {
Name string `json:"name,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
DomainID string `json:"domain_id"`
Parent string `json:"parent_id,omitempty"`
Parent string `json:"parent_group_id,omitempty"`
Description string `json:"description,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
Expand Down
6 changes: 0 additions & 6 deletions bootstrap/events/consumer/doc.go

This file was deleted.

24 changes: 0 additions & 24 deletions bootstrap/events/consumer/events.go

This file was deleted.

148 changes: 0 additions & 148 deletions bootstrap/events/consumer/streams.go

This file was deleted.

Loading
Loading