Jericho / CakeMail.RestClient

.NET wrapper for the CakeMail API
MIT License
9 stars 3 forks source link

Post Data for SetTemplate is invalid. #41

Closed beriniwlew closed 7 years ago

beriniwlew commented 7 years ago

When updating a template, it posts the following.

Posted data:

{
  "user_key": "fdsafasdfas",
  "template_id": "254203",
  "label": {
    "en_US": "Test1"
  },
  "content": "<html></html>",
  "category_id": "20322",
  "client_id": "621261"
}

Should be

{
  "user_key": "fdsafasdfas",
  "template_id": "254203",
  "label": [{
    "en_US": "Test1"
  }],
  "content": "<html></html>",
  "category_id": "20322",
  "client_id": "621261"
}

Note that label is an array.

Jericho commented 7 years ago

This is indeed a bug. In fact it's same cause as #40