Added completed user. Some fixes and more more more...

This commit is contained in:
KamilM1205 2026-01-02 22:56:25 +04:00
parent b96dd39795
commit ea8ab7c0ed
33 changed files with 576 additions and 212 deletions

View file

@ -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,
}
}