- // Need to change the videoQuota key a little bit
- const toUpdateJSON = omit(toUpdate, 'videoQuota')
- toUpdateJSON.user['video_quota'] = toUpdate.user.videoQuota
- toUpdateJSON.instance['default_client_route'] = toUpdate.instance.defaultClientRoute
- toUpdateJSON.instance['short_description'] = toUpdate.instance.shortDescription
- delete toUpdate.user.videoQuota
- delete toUpdate.instance.defaultClientRoute
- delete toUpdate.instance.shortDescription
+ // camelCase to snake_case key + Force number conversion
+ const toUpdateJSON = convertCustomConfigBody(req.body)