20 lines
442 B
Go

package authsvc
import authdomain "legalgo-BE-go/internal/domain/auth"
func (as *AuthSvc) GetStaffProfile(email string) (*authdomain.StaffProfile, error) {
staff, err := as.staffRepo.GetStaffByEmail(email)
if err != nil {
return nil, err
}
profile := &authdomain.StaffProfile{
ID: staff.ID,
Name: staff.Name,
Email: staff.Email,
ProfilePicture: staff.ProfilePicture,
}
return profile, nil
}