Page MenuHomePhabricator

D13397.diff
No OneTemporary

D13397.diff

diff --git a/keyserver/src/responders/community-responders.js b/keyserver/src/responders/community-responders.js
--- a/keyserver/src/responders/community-responders.js
+++ b/keyserver/src/responders/community-responders.js
@@ -1,8 +1,14 @@
// @flow
-import type { FetchCommunityInfosResponse } from 'lib/types/community-types.js';
+import type {
+ FetchCommunityInfosResponse,
+ FetchAllCommunityInfosWithNamesResponse,
+} from 'lib/types/community-types.js';
-import { fetchCommunityInfos } from '../fetchers/community-fetchers.js';
+import {
+ fetchCommunityInfos,
+ fetchAllCommunityInfosWithNames,
+} from '../fetchers/community-fetchers.js';
import { Viewer } from '../session/viewer.js';
async function fetchCommunityInfosResponder(
@@ -18,4 +24,19 @@
return { communityInfos };
}
-export { fetchCommunityInfosResponder };
+async function fetchAllCommunityInfosWithNamesResponder(
+ viewer: Viewer,
+): Promise<FetchAllCommunityInfosWithNamesResponse> {
+ if (!viewer.loggedIn) {
+ return { allCommunityInfosWithNames: [] };
+ }
+
+ const allCommunityInfosWithNames = await fetchAllCommunityInfosWithNames();
+
+ return { allCommunityInfosWithNames };
+}
+
+export {
+ fetchCommunityInfosResponder,
+ fetchAllCommunityInfosWithNamesResponder,
+};

File Metadata

Mime Type
text/plain
Expires
Sat, Sep 21, 6:45 PM (15 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2160823
Default Alt Text
D13397.diff (1 KB)

Event Timeline