mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-12 11:15:12 +00:00
Commit from GitHub Actions (Generate Clients & Examples)
This commit is contained in:
19
examples/user/resetPassword/go/resetPassword.go
Executable file
19
examples/user/resetPassword/go/resetPassword.go
Executable file
@@ -0,0 +1,19 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/user"
|
||||
)
|
||||
|
||||
// Reset password with the code sent by the "SendPasswordResetEmail" endoint.
|
||||
func ResetPassword() {
|
||||
userService := user.NewUserService(os.Getenv("MICRO_API_TOKEN"))
|
||||
rsp, err := userService.ResetPassword(&user.ResetPasswordRequest{
|
||||
Code: "some-code-from-email",
|
||||
ConfirmPassword: "newpass123",
|
||||
NewPassword: "newpass123",
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
}
|
||||
Reference in New Issue
Block a user