package main
import (
ext "github.com/heeus/exttinygo"
)
//export exampleExtension
func exampleExtension() {
event := ext.GetValue(ext.KeyBuilder(ext.StorageEvent, ext.NullEntity))
if event.AsString("qname") == "air.UpdateSubscription" {
json := event.AsValue("arg")
subscr := json.AsValue("subscription")
customer := json.AsValue("customer")
mail := ext.NewValue(ext.KeyBuilder(ext.StorageSendmail, ext.NullEntity))
mail.PutString("from", "test@gmail.com")
mail.PutString("to", customer.AsString("email"))
mail.PutString("body", "Your subscription has been updated. New status: "+subscr.AsString("status"))
}
}
-
Notifications
You must be signed in to change notification settings - Fork 1
License
voedger/exttinygo
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published