Skip to content

Commit

Permalink
use new mapper function
Browse files Browse the repository at this point in the history
  • Loading branch information
Pilzington committed Oct 9, 2023
1 parent 741b47e commit 778a044
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions cmd/metal-api/internal/service/tenant-service.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
mdmv1 "github.com/metal-stack/masterdata-api/api/v1"
mdm "github.com/metal-stack/masterdata-api/pkg/client"
"go.uber.org/zap"
"google.golang.org/protobuf/types/known/timestamppb"
"google.golang.org/protobuf/types/known/wrapperspb"

restfulspec "github.com/emicklei/go-restful-openapi/v2"
Expand Down Expand Up @@ -209,7 +208,7 @@ func (r *tenantResource) getTenantHistory(request *restful.Request, response *re
return
}

thres, err := r.mdc.Tenant().GetHistory(request.Request.Context(), &mdmv1.TenantGetHistoryRequest{Id: id, At: timestamppb.New(tghr.At)})
thres, err := r.mdc.Tenant().GetHistory(request.Request.Context(), mapper.ToMdmV1TenantGetHistoryRequest(&tghr, id))
if err != nil {
r.sendError(request, response, defaultError(err))
return
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/juanfont/headscale v0.22.3
github.com/looplab/fsm v0.3.0
github.com/metal-stack/go-ipam v1.8.5
github.com/metal-stack/masterdata-api v0.10.2-0.20231002103627-7c3b81a6e893
github.com/metal-stack/masterdata-api v0.10.2-0.20231009131407-3b76a1501d8c
github.com/metal-stack/metal-lib v0.13.3
github.com/metal-stack/security v0.6.7
github.com/metal-stack/v v1.0.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,8 @@ github.com/meilisearch/meilisearch-go v0.25.0 h1:xIp+8YWterHuDvpdYlwQ4Qp7im3JlRH
github.com/meilisearch/meilisearch-go v0.25.0/go.mod h1:SxuSqDcPBIykjWz1PX+KzsYzArNLSCadQodWs8extS0=
github.com/metal-stack/go-ipam v1.8.5 h1:XE1XfaU6Ck1Ucc7svTO25dlT7kEcE1oxOM3lBrWIQmE=
github.com/metal-stack/go-ipam v1.8.5/go.mod h1:JgsddJabu8A7lWD+4MJKqbQhmSA/zhBbO+Bp8pLhRZM=
github.com/metal-stack/masterdata-api v0.10.2-0.20231002103627-7c3b81a6e893 h1:PAIIHsvVtspeCAN1Dk/VlZaSMZVb9rFAvYTRBafZQvw=
github.com/metal-stack/masterdata-api v0.10.2-0.20231002103627-7c3b81a6e893/go.mod h1:cet+ezlcRoEpN8jEjRo/8xn8v946gnsdX0lDaF8/ZJY=
github.com/metal-stack/masterdata-api v0.10.2-0.20231009131407-3b76a1501d8c h1:ZWK9AE+uydKv5YUQnXsmmyQal0aETg8jpIdlSQ4vFok=
github.com/metal-stack/masterdata-api v0.10.2-0.20231009131407-3b76a1501d8c/go.mod h1:cet+ezlcRoEpN8jEjRo/8xn8v946gnsdX0lDaF8/ZJY=
github.com/metal-stack/metal-lib v0.13.3 h1:BOhwcKHILmBZd2pz2YMOhj8QxzDaz3G0F/CGuYhnu8o=
github.com/metal-stack/metal-lib v0.13.3/go.mod h1:BAR7fjdoV7DDg8i9GpJQBDaNSFirOcBs0vLYTBnhHQU=
github.com/metal-stack/security v0.6.7 h1:8wstGy0pdUmphVclAlT+9RKQmx9lF+cIGklJZAB5cIc=
Expand Down

0 comments on commit 778a044

Please sign in to comment.