Add Iroquois/Powow API mocking entrypoint
This commit is contained in:
@ -13,8 +13,10 @@ import (
|
||||
)
|
||||
|
||||
type StoreSMSRequest struct {
|
||||
From string
|
||||
Body string
|
||||
Recipient string
|
||||
Metadata map[string]interface{}
|
||||
}
|
||||
|
||||
func HandleStoreSMS(ctx context.Context, cmd cqrs.Command) error {
|
||||
@ -39,6 +41,8 @@ func HandleStoreSMS(ctx context.Context, cmd cqrs.Command) error {
|
||||
|
||||
sms.Body = req.Body
|
||||
sms.Recipient = req.Recipient
|
||||
sms.Metadata = req.Metadata
|
||||
sms.From = req.From
|
||||
|
||||
if err := db.Save(sms); err != nil {
|
||||
return errors.Wrap(err, "could not save email")
|
||||
|
Reference in New Issue
Block a user