This commit is contained in:
2026-03-07 21:25:32 +07:00
parent 2e8afd3948
commit 05cab1df89
5 changed files with 287 additions and 159 deletions
+8
View File
@@ -41,6 +41,14 @@ func mapStoryApplicationToProtoApplication(application *story_service_models.App
}
}
func mapStoryDoorToProtoDoor(door *story_service_models.Door) *proto.Door {
return &proto.Door{
Code: door.Code,
Name: door.Name,
Show: door.Show,
}
}
func mapStoryApplicationsToApplications(applications []*story_service_models.Application) []*models.Application {
res := make([]*models.Application, 0, len(applications))
for _, application := range applications {
+5
View File
@@ -147,6 +147,11 @@ func (s *Services) GetTeam(ctx context.Context, req *proto.GetTeamReq) (*proto.G
for _, application := range place.Applications {
newAction.Applications = append(newAction.Applications, mapStoryApplicationToProtoApplication(application))
}
newAction.Hidden = place.Hidden
newAction.Doors = make([]*proto.Door, 0, len(place.Doors))
for _, door := range place.Doors {
newAction.Doors = append(newAction.Doors, mapStoryDoorToProtoDoor(door))
}
res = append(res, newAction)
}
return &proto.GetTeamRsp{