From 363a04ab919cc22ef855761eb0006586e0a7981c Mon Sep 17 00:00:00 2001 From: Pavel Gabriel Date: Thu, 24 Sep 2020 12:59:03 +0300 Subject: [PATCH] fix repo name and router method --- pkg/customers/customers.go | 2 +- pkg/customers/customers_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/customers/customers.go b/pkg/customers/customers.go index 4d9efaceb..450902261 100644 --- a/pkg/customers/customers.go +++ b/pkg/customers/customers.go @@ -296,7 +296,7 @@ func createCustomer(logger log.Logger, repo CustomerRepository, customerSSNStora } } -func updateCustomer(logger log.Logger, repo customerRepository, customerSSNStorage *ssnStorage) http.HandlerFunc { +func updateCustomer(logger log.Logger, repo CustomerRepository, customerSSNStorage *ssnStorage) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { w = route.Responder(logger, w, r) w.Header().Set("Content-Type", "application/json; charset=utf-8") diff --git a/pkg/customers/customers_test.go b/pkg/customers/customers_test.go index c53818825..da03f54cb 100644 --- a/pkg/customers/customers_test.go +++ b/pkg/customers/customers_test.go @@ -456,7 +456,7 @@ func TestCustomers__updateCustomer(t *testing.T) { req := httptest.NewRequest("PUT", fmt.Sprintf("/customers/%s", customer.CustomerID), bytes.NewReader(payload)) req.Header.Set("x-namespace", "test") req.Header.Set("x-request-id", "test") - addCustomerRoutes(log.NewNopLogger(), router, repo, testCustomerSSNStorage(t), createTestOFACSearcher(nil, nil)) + AddCustomerRoutes(log.NewNopLogger(), router, repo, testCustomerSSNStorage(t), createTestOFACSearcher(nil, nil)) router.ServeHTTP(w, req) w.Flush()