Skip to content

Commit df8575b

Browse files
authored
Merge pull request #70 from DevloperAmanSingh/master
fixed messagwd
2 parents 21dd8d3 + fda1be5 commit df8575b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pkg/controller/ideas.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package controller
33
import (
44
"context"
55
"errors"
6+
67
"net/http"
78

89
"github.com/CodeChefVIT/devsoc-be-24/pkg/db"
@@ -128,7 +129,8 @@ func UpdateIdea(c echo.Context) error {
128129
}
129130

130131
return c.JSON(http.StatusOK, &models.Response{
131-
Status: "success",
132+
Status: "success",
133+
Message: "Idea updated successfully",
132134
Data: dto.Idea{
133135
Title: req.Title,
134136
Description: req.Description,

pkg/router/idea_routes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ func IdeaRoutes(incomingRoutes *echo.Echo) {
1313
idea.Use(middleware.CheckUserVerifiation)
1414

1515
idea.POST("/create", controller.CreateIdea)
16-
idea.PUT("/update/:id", controller.UpdateIdea)
16+
idea.PUT("/update", controller.UpdateIdea)
1717
idea.GET("/", controller.GetIdea)
1818
}

0 commit comments

Comments
 (0)