Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

feat: send user id when fetching announcements

thecodrr14fae7084068
diff --git a/packages/core/api/index.js b/packages/core/api/index.js
index b4fc7b0ef..14b0d6850 100644
--- a/packages/core/api/index.js
+++ b/packages/core/api/index.js
@@ -194,8 +194,11 @@ class Database {
return http.get(`${Constants.API_HOST}/version`);
}
- announcements() {
- return http.get(`${Constants.API_HOST}/announcements/active`);
+ async announcements() {
+ let url = `${Constants.API_HOST}/announcements/active`;
+ const user = await this.user.getUser();
+ if (user) url += `?userId=${user.id}`;
+ return http.get(url);
}
}