Skip to content

Commit 58efdab

Browse files
committed
Change HTTP Response
Change HTTP Response in todo handler in line 102 from http.StatusOK to http.StatusCreated
1 parent cba6ee8 commit 58efdab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/handlers/todo_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func CreateTodo(c *gin.Context) {
9999
})
100100
return
101101
}
102-
c.JSON(http.StatusOK, gin.H{
102+
c.JSON(http.StatusCreated, gin.H{
103103
"success": true,
104104
"code": http.StatusCreated,
105105
"message": "Create todo success",

0 commit comments

Comments
 (0)