22 lines
448 B
Go
Raw Normal View History

2025-02-27 18:59:58 +08:00
package authsvc
import (
staffdomain "legalgo-BE-go/internal/domain/staff"
)
2025-02-27 18:59:58 +08:00
func (as *impl) GetStaffProfile(email string) (*staffdomain.StaffProfile, error) {
staff, err := as.staffRepo.GetStaffByEmail(email)
2025-02-27 18:59:58 +08:00
if err != nil {
return nil, err
}
profile := &staffdomain.StaffProfile{
ID: staff.ID,
Name: staff.Name,
Email: staff.Email,
ProfilePicture: staff.ProfilePicture,
2025-02-27 18:59:58 +08:00
}
return profile, nil
}