Add Iroquois/Powow API mocking entrypoint

This commit is contained in:
2020-12-22 15:00:42 +01:00
parent d9a6c14041
commit 9b90eaf240
12 changed files with 358 additions and 91 deletions

View File

@ -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")