Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-12-13 13:51:33 +00:00
parent d287d1f1bd
commit 4a6f0939d7
20 changed files with 1062 additions and 1104 deletions

View File

@@ -10,7 +10,7 @@ import (
// Login using email only - Passwordless
func main() {
userService := user.NewUserService(os.Getenv("M3O_API_TOKEN"))
stream, err := userService.SendMagicLink(&user.SendMagicLinkRequest{
rsp, err := userService.SendMagicLink(&user.SendMagicLinkRequest{
Address: "www.example.com",
Email: "joe@example.com",
Endpoint: "verifytoken",
@@ -20,18 +20,5 @@ func main() {
Click here to access your account $micro_verification_link`,
})
if err != nil {
fmt.Println(err)
return
}
for {
rsp, err := stream.Recv()
if err != nil {
fmt.Println(err)
return
}
fmt.Println(rsp)
}
fmt.Println(rsp, err)
}