feat: update staff data
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user