mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-15 20:44:46 +00:00
Amend examples (#211)
This commit is contained in:
18
examples/user/updatePassword/go/updateTheAccountPassword.go
Executable file
18
examples/user/updatePassword/go/updateTheAccountPassword.go
Executable file
@@ -0,0 +1,18 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/user"
|
||||
"os"
|
||||
)
|
||||
|
||||
// Update the account password
|
||||
func UpdateTheAccountPassword() {
|
||||
userService := user.NewUserService(os.Getenv("MICRO_API_TOKEN"))
|
||||
rsp, err := userService.UpdatePassword(&user.UpdatePasswordRequest{
|
||||
ConfirmPassword: "myEvenMoreSecretPass123",
|
||||
NewPassword: "myEvenMoreSecretPass123",
|
||||
OldPassword: "mySecretPass123",
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
}
|
||||
Reference in New Issue
Block a user