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 (
"gorm.io/gorm"
)
func (sr *StaffRepository) GetStaffByEmail(email string) (*authdomain.LoginRepoResponse, error) {
var staff authdomain.LoginRepoResponse
func (sr *StaffRepository) GetStaffByEmail(email string) (*authdomain.Staff, error) {
var staff authdomain.Staff
if email == "" {
return nil, errors.New("email is empty")
+1 -1
View File
@@ -10,7 +10,7 @@ type StaffRepository struct {
}
type StaffIntf interface {
GetStaffByEmail(string) (*authdomain.LoginRepoResponse, error)
GetStaffByEmail(string) (*authdomain.Staff, error)
Create(*authdomain.Staff) (*authdomain.Staff, error)
}