no issue
- we were passing the theme name directly in the model query filter string without any surrounding `'` chars meaning we were generating invalid filters
no issue
Ghost allows multiple themes with the same `name` value in `package.json` so it assigns custom names based on the file name. When syncing we were only looking at the package.json `name` value so there could be a syncing clash when swapping between active themes.
- added `name` as the first argument to `.activateTheme(name, theme)` so that the service's consumer is in control of settings sync applying to it's known theme name
refs https://github.com/TryGhost/Team/issues/1104
- better matches the context of the request as we're validating known keys and valid options from multiple settings
- "404 Not Found" didn't make sense because `/custom_theme_settings/` _does_ exist, it's just that one setting key wasn't known
- "400 Bad Request" didn't make sense because the request was understood, it just failed validation of the setting values
refs https://github.com/TryGhost/Team/issues/1104
- there was a mismatch of template options when throwing error on invalid select value meaning we were erroring but with the wrong error type and message
- added missing `lodash` dependency in package.json
refs https://github.com/TryGhost/Team/issues/1104
- `.get('key')` would error because it was incorrectly expecting the internal content object to contain `{key, value}` objects
- changed `.getAll()` to return a shallow copy of the internal content object so we don't leak references that can result in unexpected changes to the cache content
- changed the internal content object naming to `_content` to highlight that it's an internal/private implementation detail rather than a public API