Added completed user. Some fixes and more more more...
This commit is contained in:
parent
b96dd39795
commit
ea8ab7c0ed
33 changed files with 576 additions and 212 deletions
|
|
@ -3,11 +3,24 @@ package mapper
|
|||
import (
|
||||
"58team_blog/internal/application/common"
|
||||
"58team_blog/internal/interfaces/api/responses"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func ResponseFromUserResult(result *common.UserResult) responses.UserResponse {
|
||||
skills := strings.Split(result.Skills, ";")
|
||||
projects := strings.Split(result.Projects, ";")
|
||||
|
||||
return responses.UserResponse{
|
||||
Id: result.Id.String(),
|
||||
UserName: result.UserName,
|
||||
Id: result.Id.String(),
|
||||
UserName: result.UserName,
|
||||
Name: result.Name,
|
||||
Role: result.Role,
|
||||
Speciality: result.Speciality,
|
||||
Description: result.Description,
|
||||
Skills: skills,
|
||||
Avatar: result.Avatar,
|
||||
JoinDate: result.JoinDate,
|
||||
Projects: projects,
|
||||
Motto: result.Motto,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue