Files
bibliomane/internal/mapper/userbookpostcreate.go
Arthur Lefebvre 9404013592 add post userbook
needed a refactor to check the id in db during dto validation
2025-10-17 01:13:35 +02:00

14 lines
287 B
Go

package mapper
import (
"git.artlef.fr/PersonalLibraryManager/internal/dto"
"git.artlef.fr/PersonalLibraryManager/internal/model"
)
func UserBookWsToDb(ub dto.UserBookPostCreate, user *model.User) model.UserBook {
return model.UserBook{
UserID: user.ID,
BookID: ub.BookID,
}
}