aboutsummaryrefslogtreecommitdiff
path: root/src/services/api/api.service.js
diff options
context:
space:
mode:
authorMaxim Filippov <colixer@gmail.com>2019-01-23 19:46:35 +0300
committerMaxim Filippov <colixer@gmail.com>2019-01-23 19:46:35 +0300
commit958557201a95f125f40392fbeb33c284301ca7fd (patch)
tree76988bf667762d84da35a7461b6bdf34f5598a43 /src/services/api/api.service.js
parentc8caa477d7f9d6b793ba0f75c736510f47298014 (diff)
Always send "hide_network" when updating user profile
Diffstat (limited to 'src/services/api/api.service.js')
-rw-r--r--src/services/api/api.service.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index 2b1ef5df..776d8dae 100644
--- a/src/services/api/api.service.js
+++ b/src/services/api/api.service.js
@@ -129,13 +129,14 @@ const updateBanner = ({credentials, params}) => {
// location
// description
const updateProfile = ({credentials, params}) => {
+ // Always include these fields, because they might be empty or false
+ const fields = ['description', 'locked', 'no_rich_text', 'hide_network']
let url = PROFILE_UPDATE_URL
const form = new FormData()
each(params, (value, key) => {
- /* Always include description, no_rich_text and locked, because it might be empty or false */
- if (key === 'description' || key === 'locked' || key === 'no_rich_text' || value) {
+ if (fields.includes(key) || value) {
form.append(key, value)
}
})