generated from VLADIMIR/template
fix login
This commit is contained in:
@@ -2,6 +2,7 @@ package services
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"evening_detective/internal/models"
|
||||
"evening_detective/internal/modules/password"
|
||||
@@ -96,7 +97,10 @@ func (s *Services) GetTeam(ctx context.Context, req *proto.GetTeamReq) (*proto.G
|
||||
}
|
||||
res = append(res, newAction)
|
||||
}
|
||||
return &proto.GetTeamRsp{Actions: res}, err
|
||||
return &proto.GetTeamRsp{
|
||||
Name: team.Name,
|
||||
Actions: res,
|
||||
}, err
|
||||
}
|
||||
|
||||
func (s *Services) GetTeamsCSV(ctx context.Context, req *proto.GetTeamsCSVReq) (*proto.GetTeamsCSVRsp, error) {
|
||||
@@ -154,7 +158,10 @@ func (s *Services) getTeam(ctx context.Context) (*models.Team, error) {
|
||||
if !ok {
|
||||
return nil, status.Errorf(codes.Unauthenticated, "error creds")
|
||||
}
|
||||
teamId := teamIdArr[0]
|
||||
teamId, err := base64.StdEncoding.DecodeString(teamIdArr[0])
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Unauthenticated, "error creds")
|
||||
}
|
||||
|
||||
passwordArr, ok := md["password"]
|
||||
if !ok {
|
||||
|
||||
Reference in New Issue
Block a user