submissions: rename svc.Client to svc.Maps

This commit is contained in:
Quaternions 2025-04-13 17:14:21 -07:00
parent 5ba52ecb57
commit e0cebfd80e
Signed by: Quaternions
GPG Key ID: D0DF5964F79AC131
5 changed files with 6 additions and 6 deletions

@ -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()))

@ -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 {

@ -25,7 +25,7 @@ func (svc *Service) ListMaps(ctx context.Context, params api.ListMapsParams) ([]
filter.GameID = &params.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 {

@ -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.

@ -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,