generated from VLADIMIR/template
add teams tests
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"evening_detective/internal/models"
|
||||
"evening_detective/internal/services/story_service"
|
||||
"evening_detective/proto"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func mapTeamsToTeamAdvanced(team *models.Team) *proto.TeamAdvanced {
|
||||
@@ -24,7 +25,7 @@ func mapTeamsToTeamFull(team *models.Team) *proto.TeamFull {
|
||||
|
||||
func mapProtoTeamsToTeam(team *proto.Team) *models.Team {
|
||||
return &models.Team{
|
||||
Name: team.Name,
|
||||
Name: clearTeamName(team.Name),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,3 +86,7 @@ func mapProtoApplicationToApplication(items *proto.Application) *models.Applicat
|
||||
ID: items.Id,
|
||||
}
|
||||
}
|
||||
|
||||
func clearTeamName(code string) string {
|
||||
return strings.TrimSpace(code)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user