mirror of
https://github.com/getAlby/lndhub.go.git
synced 2025-12-21 22:54:48 +01:00
Add support for providing user name and password when creating user
This commit is contained in:
@@ -25,6 +25,8 @@ type CreateUserResponseBody struct {
|
||||
func (controller *CreateUserController) CreateUser(c echo.Context) error {
|
||||
// optional parameters that we currently do not use
|
||||
type RequestBody struct {
|
||||
Login string `json:"login"`
|
||||
Password string `json:"password"`
|
||||
PartnerID string `json:"partnerid"`
|
||||
AccountType string `json:"accounttype"`
|
||||
}
|
||||
@@ -33,7 +35,7 @@ func (controller *CreateUserController) CreateUser(c echo.Context) error {
|
||||
if err := c.Bind(&body); err != nil {
|
||||
return err
|
||||
}
|
||||
user, err := controller.svc.CreateUser(c.Request().Context())
|
||||
user, err := controller.svc.CreateUser(c.Request().Context(), body.Login, body.Password)
|
||||
//todo json response
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user