diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-10-15 15:09:40 -0400 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-10-15 15:17:07 -0400 |
commit | 327b0b5a2119ae888c812f682b3934061b8f59bf (patch) | |
tree | d2b91e8649a68ec0b87e4e7349d29965a664b43a /web/react/utils/client.jsx | |
parent | 4b99e1714029689f27ebf4cb078c60367b0594a4 (diff) | |
download | chat-327b0b5a2119ae888c812f682b3934061b8f59bf.tar.gz chat-327b0b5a2119ae888c812f682b3934061b8f59bf.tar.bz2 chat-327b0b5a2119ae888c812f682b3934061b8f59bf.zip |
Added an initial call to get all user preferences on page load
Diffstat (limited to 'web/react/utils/client.jsx')
-rw-r--r-- | web/react/utils/client.jsx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx index 76a402855..f6aee362c 100644 --- a/web/react/utils/client.jsx +++ b/web/react/utils/client.jsx @@ -1142,6 +1142,19 @@ export function listIncomingHooks(success, error) { }); } +export function getAllPreferences(success, error) { + $.ajax({ + url: `/api/v1/preferences/`, + dataType: 'json', + type: 'GET', + success, + error: (xhr, status, err) => { + var e = handleError('getAllPreferences', xhr, status, err); + error(e); + } + }); +} + export function getPreferenceCategory(category, success, error) { $.ajax({ url: `/api/v1/preferences/${category}`, |