fix: handle duplicate input

This commit is contained in:
ericprd
2025-02-24 19:47:40 +08:00
parent bd305f0edf
commit 3b2321d5db
7 changed files with 19 additions and 10 deletions
+2 -2
View File
@@ -7,8 +7,8 @@ import (
"github.com/ardeman/project-legalgo-go/internal/utilities/utils"
)
func (sv *AuthSvc) LoginAsUser(spec authdomain.LoginReq) (string, error) {
user, err := sv.userRepo.GetUserByEmail(spec.Email)
func (a *AuthSvc) LoginAsUser(spec authdomain.LoginReq) (string, error) {
user, err := a.userRepo.GetUserByEmail(spec.Email)
if err != nil {
return "", errors.New(err.Error())
}