diff --git a/pkg/cmds/serve.go b/pkg/cmds/serve.go index ccab4cd..05e8d1c 100644 --- a/pkg/cmds/serve.go +++ b/pkg/cmds/serve.go @@ -125,7 +125,7 @@ func serve(ctx *cli.Context) error { svc := &service.Service{ DB: db, Nats: js, - Client: maps.NewMapsServiceClient(conn), + Maps: maps.NewMapsServiceClient(conn), } conn, err = grpc.Dial(ctx.String("auth-rpc-host"), grpc.WithTransportCredentials(insecure.NewCredentials())) diff --git a/pkg/service/mapfixes.go b/pkg/service/mapfixes.go index 8c42171..1712afd 100644 --- a/pkg/service/mapfixes.go +++ b/pkg/service/mapfixes.go @@ -78,7 +78,7 @@ func (svc *Service) CreateMapfix(ctx context.Context, request *api.MapfixTrigger // Check if TargetAssetID actually exists { - _, err := svc.Client.Get(ctx, &maps.IdMessage{ + _, err := svc.Maps.Get(ctx, &maps.IdMessage{ ID: request.TargetAssetID, }) if err != nil { diff --git a/pkg/service/maps.go b/pkg/service/maps.go index f789da6..aa7b52f 100644 --- a/pkg/service/maps.go +++ b/pkg/service/maps.go @@ -25,7 +25,7 @@ func (svc *Service) ListMaps(ctx context.Context, params api.ListMapsParams) ([] filter.GameID = ¶ms.GameID.Value } - mapList, err := svc.Client.List(ctx, &maps.ListRequest{ + mapList, err := svc.Maps.List(ctx, &maps.ListRequest{ Filter: &filter, Page: &maps.Pagination{ Size: params.Limit, @@ -56,7 +56,7 @@ func (svc *Service) ListMaps(ctx context.Context, params api.ListMapsParams) ([] // // GET /maps/{MapID} func (svc *Service) GetMap(ctx context.Context, params api.GetMapParams) (*api.Map, error) { - mapResponse, err := svc.Client.Get(ctx, &maps.IdMessage{ + mapResponse, err := svc.Maps.Get(ctx, &maps.IdMessage{ ID: params.MapID, }) if err != nil { diff --git a/pkg/service/service.go b/pkg/service/service.go index 2114850..dcfb74d 100644 --- a/pkg/service/service.go +++ b/pkg/service/service.go @@ -32,7 +32,7 @@ var ( type Service struct { DB datastore.Datastore Nats nats.JetStreamContext - Client maps.MapsServiceClient + Maps maps.MapsServiceClient } // NewError creates *ErrorStatusCode from error returned by handler. diff --git a/pkg/service/submissions.go b/pkg/service/submissions.go index c1ce44c..955f5eb 100644 --- a/pkg/service/submissions.go +++ b/pkg/service/submissions.go @@ -1061,7 +1061,7 @@ func (svc *Service) ReleaseSubmissions(ctx context.Context, request []api.Releas date := request[i].Date.Unix() var GameID = int32(submission.GameID) // create each map with go-grpc - _, err := svc.Client.Create(ctx, &maps.MapRequest{ + _, err := svc.Maps.Create(ctx, &maps.MapRequest{ ID: int64(submission.UploadedAssetID), DisplayName: &submission.DisplayName, Creator: &submission.Creator,