Fix file parameter for POST: "/api/themes/:themeId"
Current behavior: When doing a POST request on "/api/themes/:themeId" with a themeId that is not a converter theme, a 500 internal server error is returned.
Expected behavior:
A 405 error should be returned with the message "Theme "+theme.id+" is not a converter, please use GET /api/themes/"+theme.id+" instead."
Fix:
We are trying to access theme.parameters
before we check if the theme is a converter. According to the documentation, this is only defined for converter themes and not defined for exposer themes. This commit makes sure that we check that the theme is a converter before accessing theme.parameters
.