generated from VLADIMIR/template
fix
This commit is contained in:
@@ -4,18 +4,28 @@ import (
|
||||
"context"
|
||||
|
||||
"evening_detective_server/internal/modules/roles"
|
||||
"evening_detective_server/internal/repos/game_reviews_repo"
|
||||
"evening_detective_server/internal/services/game_review_service"
|
||||
"evening_detective_server/proto"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
)
|
||||
|
||||
func mapGameReview(r *game_reviews_repo.Review) *proto.GameReview {
|
||||
return &proto.GameReview{ID: int32(r.ID), GameID: int32(r.GameID), TeamID: int32(r.TeamID), TeamName: r.TeamName, Rating: r.Rating, Text: r.Text, Status: r.Status, CreatedAt: timestamppb.New(r.CreatedAt), GameName: r.GameName}
|
||||
func mapGameReview(r *game_review_service.Review) *proto.GameReview {
|
||||
return &proto.GameReview{
|
||||
ID: int32(r.ID),
|
||||
GameID: int32(r.GameID),
|
||||
TeamID: int32(r.TeamID),
|
||||
TeamName: r.TeamName,
|
||||
Rating: r.Rating,
|
||||
Text: r.Text,
|
||||
Status: r.Status,
|
||||
CreatedAt: timestamppb.New(r.CreatedAt),
|
||||
GameName: r.GameName,
|
||||
}
|
||||
}
|
||||
|
||||
func mapGameReviews(reviews []*game_reviews_repo.Review) []*proto.GameReview {
|
||||
func mapGameReviews(reviews []*game_review_service.Review) []*proto.GameReview {
|
||||
result := make([]*proto.GameReview, 0, len(reviews))
|
||||
for _, review := range reviews {
|
||||
result = append(result, mapGameReview(review))
|
||||
|
||||
@@ -27,7 +27,7 @@ type server struct {
|
||||
gameService *game_service.GameService
|
||||
gameplayService *gameplay_service.GameplayService
|
||||
answerService *answer_service.AnswerService
|
||||
reviewService *game_review_service.Service
|
||||
reviewService *game_review_service.GameReviewService
|
||||
teamService *team_service.TeamService
|
||||
ticketService *ticket_service.Service
|
||||
participationService *participation_service.ParticipationService
|
||||
@@ -43,7 +43,7 @@ func NewServer(
|
||||
gameService *game_service.GameService,
|
||||
gameplayService *gameplay_service.GameplayService,
|
||||
answerService *answer_service.AnswerService,
|
||||
reviewService *game_review_service.Service,
|
||||
reviewService *game_review_service.GameReviewService,
|
||||
teamService *team_service.TeamService,
|
||||
ticketService *ticket_service.Service,
|
||||
participationService *participation_service.ParticipationService,
|
||||
|
||||
Reference in New Issue
Block a user