feat: fixing article categories response
This commit is contained in:
parent
15617ee77a
commit
ad76fbc9ae
|
|
@ -3,6 +3,7 @@ package mapper
|
|||
import (
|
||||
"go-humas-be/app/database/entity"
|
||||
res "go-humas-be/app/module/article_categories/response"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func ArticleCategoriesResponseMapper(articleCategoriesReq *entity.ArticleCategories) (articleCategoriesRes *res.ArticleCategoriesResponse) {
|
||||
|
|
@ -12,6 +13,7 @@ func ArticleCategoriesResponseMapper(articleCategoriesReq *entity.ArticleCategor
|
|||
Title: articleCategoriesReq.Title,
|
||||
Description: articleCategoriesReq.Description,
|
||||
ThumbnailPath: articleCategoriesReq.ThumbnailPath,
|
||||
ThumbnailUrl: "/article-categories/thumbnail/viewer" + strconv.Itoa(int(articleCategoriesReq.ID)),
|
||||
ParentId: articleCategoriesReq.ParentId,
|
||||
CreatedById: articleCategoriesReq.CreatedById,
|
||||
StatusId: articleCategoriesReq.StatusId,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ type ArticleCategoriesResponse struct {
|
|||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
ThumbnailPath *string `json:"thumbnailPath"`
|
||||
ThumbnailUrl *string `json:"thumbnailUrl"`
|
||||
ThumbnailUrl string `json:"thumbnailUrl"`
|
||||
ParentId *int `json:"parentId"`
|
||||
CreatedById *uint `json:"createdById"`
|
||||
StatusId int `json:"statusId"`
|
||||
|
|
|
|||
Loading…
Reference in New Issue