diff --git a/docs/style.md b/docs/style.md index 8009f0aa676..9acde7be1c5 100644 --- a/docs/style.md +++ b/docs/style.md @@ -654,7 +654,7 @@ import * as api from '../api'; // … - api.subscriptionAdd(auth, [{ name: stream.name }]); + const response = await api.uploadFile(auth, url, name); ``` @@ -662,12 +662,12 @@ rather than like this: ```js // BAD -import subscriptionAdd from '../api/subscriptions/subscriptionAdd'; +import uploadFile from '../api/uploadFile.js; // … // BAD - subscriptionAdd(auth, [{ name: stream.name }]); + const response = await uploadFile(auth, url, name); ``` We do this because a lot of the names in our API bindings are also diff --git a/src/api/subscriptions/subscriptionAdd.js b/src/api/subscriptions/subscriptionAdd.js index 6f380f799dd..49d11970442 100644 --- a/src/api/subscriptions/subscriptionAdd.js +++ b/src/api/subscriptions/subscriptionAdd.js @@ -5,7 +5,6 @@ import { apiPost } from '../apiFetch'; type SubscriptionObj = {| // TODO(server-future): This should use a stream ID (#3918), not stream name. // Server issue: https://github.com/zulip/zulip/issues/10744 - // TODO(#3918): Change example in docs/style.md to something without this issue. name: string, |};