fix: change username to name and add profile pic to staff

This commit is contained in:
ericprd
2025-03-03 10:39:01 +08:00
parent c02d8cda69
commit afe6f4e9a6
6 changed files with 37 additions and 27 deletions
+4 -3
View File
@@ -9,9 +9,10 @@ func (as *AuthSvc) GetStaffProfile(email string) (*authdomain.StaffProfile, erro
}
profile := &authdomain.StaffProfile{
ID: staff.ID,
Username: staff.Username,
Email: staff.Email,
ID: staff.ID,
Name: staff.Name,
Email: staff.Email,
ProfilePicture: staff.ProfilePicture,
}
return profile, nil
+5 -4
View File
@@ -20,10 +20,11 @@ func (a *AuthSvc) RegisterStaff(spec authdomain.RegisterStaffReq) (string, error
}
staff := authdomain.Staff{
ID: uuid.NewString(),
Email: spec.Email,
Password: hashedPwd,
Username: spec.Username,
ID: uuid.NewString(),
Email: spec.Email,
Password: hashedPwd,
Name: spec.Name,
ProfilePicture: spec.ProfilePicture,
}
_, err = a.staffRepo.Create(&staff)