feat: implemented own profile getter;
experiment: using custom automapper function to map profile to profileDto; refactor: adjusted ProfileService to use pointer return types with models
This commit is contained in:
@@ -24,7 +24,7 @@ import (
|
||||
"github.com/rafiulgits/go-automapper"
|
||||
)
|
||||
|
||||
func Map(dbModel database.Profile, dtoModel dto.ProfileDto) {
|
||||
func MapProfileDto(dbModel database.Profile, dtoModel dto.ProfileDto) {
|
||||
automapper.Map(dbModel, &dbModel, func(src *database.Profile, dst *dto.ProfileDto) {
|
||||
dst.Birthday = int64(dbModel.Birthday.Time.UnixMilli())
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user