Skip to content

Commit

Permalink
Merge pull request #208 from getAlby/feature/id-in-auth-response
Browse files Browse the repository at this point in the history
also return user id when generating token
  • Loading branch information
kiwiidb committed Jul 8, 2022
2 parents 4498312 + bc8873b commit a437792
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 a437792

Please sign in to comment.