summaryrefslogtreecommitdiffstats
path: root/web/react/utils/client.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/utils/client.jsx')
-rw-r--r--web/react/utils/client.jsx13
1 files changed, 13 insertions, 0 deletions
diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx
index f1827f296..2134dc0f5 100644
--- a/web/react/utils/client.jsx
+++ b/web/react/utils/client.jsx
@@ -1155,3 +1155,16 @@ export function getPreferencesByName(category, name, success, error) {
});
}
+export function setPreferences(preferences, success, error) {
+ $.ajax({
+ url: '/api/v1/preferences/set',
+ dataType: 'json',
+ type: 'POST',
+ data: JSON.stringify(preferences),
+ success,
+ error: (xhr, status, err) => {
+ var e = handleError('setPreferences', xhr, status, err);
+ error(e);
+ }
+ });
+}