22 lines
444 B
Go
Raw Normal View History

2025-03-14 12:41:11 +08:00
package staffsvc
2025-02-27 18:59:58 +08:00
import (
staffdomain "legalgo-BE-go/internal/domain/staff"
)
2025-02-27 18:59:58 +08:00
2025-03-14 12:41:11 +08:00
func (as *impl) GetProfile(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
}