22 lines
435 B
Go
Raw Permalink 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 13:00:12 +08:00
func (as *impl) GetProfile(id string) (*staffdomain.StaffProfile, error) {
staff, err := as.staffRepo.GetStaffByID(id)
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
}