Skip to content

Commit 13cd8dd

Browse files
committed
update: req and rsp fields
1 parent 195452b commit 13cd8dd

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

app/internal/port/http/handler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func (h *Handler) HandlePostRequests(ctx *fiber.Ctx) error {
2323
return ctx.SendStatus(http.StatusBadRequest)
2424
}
2525

26-
if _, err := h.Connection.Query(insertQuery, userReq.name, userReq.email); err != nil {
26+
if _, err := h.Connection.Query(insertQuery, userReq.Name, userReq.Email); err != nil {
2727
return ctx.SendStatus(http.StatusInternalServerError)
2828
}
2929

app/internal/port/http/request.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package http
22

33
type request struct {
4-
name string `json:"name"`
5-
email string `json:"email"`
4+
Name string `json:"name"`
5+
Email string `json:"email"`
66
}

app/internal/port/http/response.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package http
22

33
type response struct {
4-
id int `json:"id"`
5-
name string `json:"name"`
6-
email string `json:"email"`
4+
ID int `json:"id"`
5+
Name string `json:"name"`
6+
Email string `json:"email"`
77
}

0 commit comments

Comments
 (0)