22 lines
444 B
Go
22 lines
444 B
Go
package staffsvc
|
|
|
|
import (
|
|
staffdomain "legalgo-BE-go/internal/domain/staff"
|
|
)
|
|
|
|
func (as *impl) GetProfile(email string) (*staffdomain.StaffProfile, error) {
|
|
staff, err := as.staffRepo.GetStaffByEmail(email)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
profile := &staffdomain.StaffProfile{
|
|
ID: staff.ID,
|
|
Name: staff.Name,
|
|
Email: staff.Email,
|
|
ProfilePicture: staff.ProfilePicture,
|
|
}
|
|
|
|
return profile, nil
|
|
}
|