generated from VLADIMIR/template
update
This commit is contained in:
@@ -3,14 +3,14 @@ package app
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"evening_detective_server/internal/repos/teams_repo"
|
||||
"evening_detective_server/internal/services/participation_service"
|
||||
"evening_detective_server/proto"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
)
|
||||
|
||||
func mapParticipationResponse(p *teams_repo.Participation) *proto.ParticipationRsp {
|
||||
func mapParticipationResponse(p *participation_service.Participation) *proto.ParticipationRsp {
|
||||
result := &proto.ParticipationRsp{}
|
||||
if p != nil {
|
||||
result.TeamName = p.TeamName
|
||||
@@ -24,7 +24,7 @@ func mapParticipationResponse(p *teams_repo.Participation) *proto.ParticipationR
|
||||
}
|
||||
|
||||
func participationError(err error) string {
|
||||
if errors.Is(err, teams_repo.ErrParticipationLink) || errors.Is(err, teams_repo.ErrParticipationFinal) || errors.Is(err, teams_repo.ErrParticipationClosed) {
|
||||
if errors.Is(err, participation_service.ErrParticipationLink) || errors.Is(err, participation_service.ErrParticipationFinal) || errors.Is(err, participation_service.ErrParticipationClosed) {
|
||||
return err.Error()
|
||||
}
|
||||
return "Не удалось обработать ответ. Попробуйте позже."
|
||||
|
||||
Reference in New Issue
Block a user