aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/zulip/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/zulip/index.js')
-rw-r--r--recipes/zulip/index.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/recipes/zulip/index.js b/recipes/zulip/index.js
index 199d0f4..cd8ffea 100644
--- a/recipes/zulip/index.js
+++ b/recipes/zulip/index.js
@@ -1,13 +1,13 @@
1module.exports = Franz => class Zulip extends Franz { 1module.exports = Franz => class Zulip extends Franz {
2 async validateUrl(url) { 2 async validateUrl(url) {
3 const baseUrl = new window.URL(url); 3 const baseUrl = new window.URL(url);
4 const apiVersion = 'api/v1' 4 const apiVersion = 'api/v1';
5 try { 5 try {
6 const resp = await window.fetch(`${baseUrl.origin}/${apiVersion}/server_settings`, { 6 const resp = await window.fetch(`${baseUrl.origin}/${apiVersion}/server_settings`, {
7 method: 'GET', 7 method: 'GET',
8 headers: { 8 headers: {
9 'Content-Type': 'application/json', 9 'Content-Type': 'application/json',
10 }, 10 },
11 }); 11 });
12 const data = await resp.json(); 12 const data = await resp.json();
13 13