From 116433b2f03b7f22cdedcc4414e55f03d46a8390 Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Tue, 7 May 2024 13:51:09 +0700 Subject: [PATCH] feat: update ppid categories response --- .../ppid_data_categories/mapper/ppid_data_categories.mapper.go | 3 ++- .../response/ppid_data_categories.response.go | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/module/ppid_data_categories/mapper/ppid_data_categories.mapper.go b/app/module/ppid_data_categories/mapper/ppid_data_categories.mapper.go index 9c676f4..0b6b6b7 100644 --- a/app/module/ppid_data_categories/mapper/ppid_data_categories.mapper.go +++ b/app/module/ppid_data_categories/mapper/ppid_data_categories.mapper.go @@ -18,7 +18,8 @@ func PpidDataCategoriesResponseMapper(ppidDataCategoriesReq *entity.PpidDataCate Title: ppidDataCategoriesReq.Title, Description: ppidDataCategoriesReq.Description, Slug: ppidDataCategoriesReq.Slug, - ThumbnailUrl: "/ppid-data-categories/viewer/" + strconv.Itoa(int(ppidDataCategoriesReq.ID)), + ParentId: ppidDataCategoriesReq.ParentId, + ThumbnailUrl: "/ppid-data-categories/thumbnail/viewer/" + strconv.Itoa(int(ppidDataCategoriesReq.ID)), IsActive: ppidDataCategoriesReq.IsActive, CreatedAt: ppidDataCategoriesReq.CreatedAt, UpdatedAt: ppidDataCategoriesReq.UpdatedAt, diff --git a/app/module/ppid_data_categories/response/ppid_data_categories.response.go b/app/module/ppid_data_categories/response/ppid_data_categories.response.go index d90726f..ac636d6 100644 --- a/app/module/ppid_data_categories/response/ppid_data_categories.response.go +++ b/app/module/ppid_data_categories/response/ppid_data_categories.response.go @@ -7,6 +7,7 @@ type PpidDataCategoriesResponse struct { Title string `json:"title"` Description string `json:"description"` Slug string `json:"slug"` + ParentId *uint `json:"parentId"` ThumbnailUrl string `json:"thumbnailUrl"` IsActive *bool `json:"isActive"` CreatedAt time.Time `json:"createdAt"`