Refactor api code: split between packages
This commit is contained in:
14
internal/mapper/bookuserget.go
Normal file
14
internal/mapper/bookuserget.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package mapper
|
||||
|
||||
import (
|
||||
"git.artlef.fr/PersonalLibraryManager/internal/dto"
|
||||
"git.artlef.fr/PersonalLibraryManager/internal/model"
|
||||
)
|
||||
|
||||
func UserBookDbToWs(b *model.UserBook) dto.BookUserGet {
|
||||
return dto.BookUserGet{
|
||||
Title: b.Book.Title,
|
||||
Author: b.Book.Author,
|
||||
Rating: b.Rating,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user