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.jsx14
1 files changed, 14 insertions, 0 deletions
diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx
index 6dccfcdeb..f1827f296 100644
--- a/web/react/utils/client.jsx
+++ b/web/react/utils/client.jsx
@@ -1141,3 +1141,17 @@ export function listIncomingHooks(success, error) {
}
});
}
+
+export function getPreferencesByName(category, name, success, error) {
+ $.ajax({
+ url: `/api/v1/preferences/${category}/${name}`,
+ dataType: 'json',
+ type: 'GET',
+ success,
+ error: (xhr, status, err) => {
+ var e = handleError('getPreferencesByName', xhr, status, err);
+ error(e);
+ }
+ });
+}
+