Removed coupling with useless services in actions

This commit is contained in:
PB
2025-10-22 17:10:54 +02:00
parent e546d16222
commit ee0b512bfe
10 changed files with 54 additions and 44 deletions

View File

@@ -6,6 +6,7 @@ import (
"fmt"
"strings"
dto "git.ego.freeddns.org/egommerce/api-entities/identity/dto"
entity "git.ego.freeddns.org/egommerce/api-entities/identity/entity"
domain "git.ego.freeddns.org/egommerce/identity-service/domain/repository"
@@ -116,8 +117,8 @@ func (a *AuthService) Register(email, login, passwd string) (string, error) {
return id, nil
}
func (a *AuthService) getTokenFromAuthorizationHeader(header string) (string, error) {
split := strings.Split(header, " ")
func (a *AuthService) GetTokenFromAuthorizationHeader(header *dto.AuthorizationHeaderDTO) (string, error) {
split := strings.Split(header.Authorization, " ")
if len(split) != 2 {
return "", ErrParsingAccessToken
}