fix: handle duplicate input
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user