File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 77 "net/http"
88
99 "github.com/CodeChefVIT/devsoc-be-24/pkg/db"
10+ "github.com/CodeChefVIT/devsoc-be-24/pkg/dto"
1011 logger "github.com/CodeChefVIT/devsoc-be-24/pkg/logging"
1112 "github.com/CodeChefVIT/devsoc-be-24/pkg/models"
1213 "github.com/CodeChefVIT/devsoc-be-24/pkg/utils"
@@ -170,8 +171,11 @@ func GetIdea(c echo.Context) error {
170171 return c .JSON (http .StatusOK , & models.Response {
171172 Status : "success" ,
172173 Message : "ideas fetched successfully" ,
173- Data : map [string ]interface {}{
174- "ideas" : ideas ,
174+ Data : dto.Idea {
175+ Title : ideas .Title ,
176+ Description : ideas .Description ,
177+ Track : ideas .Track ,
178+
175179 },
176180 })
177181}
Original file line number Diff line number Diff line change 1+ package dto
2+
3+ type Idea struct {
4+ Title string `json:"title"`
5+ Description string `json:"description"`
6+ Track string `json:"track"`
7+ }
You can’t perform that action at this time.
0 commit comments