summaryrefslogtreecommitdiffstats
path: root/webapp/client/client.jsx
diff options
context:
space:
mode:
authorCarlos Tadeu Panato Junior <ctadeu@gmail.com>2016-12-12 06:30:37 +0100
committerCorey Hulen <corey@hulen.com>2016-12-11 21:30:37 -0800
commitf0d71d87899967335210b9130a7e2b8d180bef46 (patch)
treed2941b8870e87677a84821dd32454a28594c889b /webapp/client/client.jsx
parentb5fcfd608c0e9ef764cace7328653e4d4c47a061 (diff)
downloadchat-f0d71d87899967335210b9130a7e2b8d180bef46.tar.gz
chat-f0d71d87899967335210b9130a7e2b8d180bef46.tar.bz2
chat-f0d71d87899967335210b9130a7e2b8d180bef46.zip
Add API call to get a channel by its name (#4700)
* add api for getByChannelName * add tests * fix test * rename and tests * check for permissions and test
Diffstat (limited to 'webapp/client/client.jsx')
-rw-r--r--webapp/client/client.jsx9
1 files changed, 9 insertions, 0 deletions
diff --git a/webapp/client/client.jsx b/webapp/client/client.jsx
index 398ce4f83..88f910d46 100644
--- a/webapp/client/client.jsx
+++ b/webapp/client/client.jsx
@@ -1441,6 +1441,15 @@ export default class Client {
end(this.handleResponse.bind(this, 'getMyChannelMembers', success, error));
}
+ getChannelByName(channelName, success, error) {
+ request.
+ get(`${this.getChannelsRoute()}/name/${channelName}`).
+ set(this.defaultHeaders).
+ type('application/json').
+ accept('application/json').
+ end(this.handleResponse.bind(this, 'getChannelByName', success, error));
+ }
+
getChannelStats(channelId, success, error) {
request.
get(`${this.getChannelNeededRoute(channelId)}/stats`).