Skip to content

Commit

Permalink
only return user id on create call
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwiidb committed Jul 8, 2022
1 parent 4498312 commit bc8873b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions controllers_v2/create.ctrl.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func NewCreateUserController(svc *service.LndhubService) *CreateUserController {
type CreateUserResponseBody struct {
Login string `json:"login"`
Password string `json:"password"`
ID int64 `json:"id"`
}
type CreateUserRequestBody struct {
Login string `json:"login"`
Expand Down Expand Up @@ -54,6 +55,7 @@ func (controller *CreateUserController) CreateUser(c echo.Context) error {
var ResponseBody CreateUserResponseBody
ResponseBody.Login = user.Login
ResponseBody.Password = user.Password
ResponseBody.ID = user.ID

return c.JSON(http.StatusOK, &ResponseBody)
}

0 comments on commit bc8873b

Please sign in to comment.