Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32562579
D13397.1767341446.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D13397.1767341446.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 2, 8:10 AM (6 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5876927
Default Alt Text
D13397.1767341446.diff (1 KB)
Attached To
Mode
D13397: [keyserver] new responder function to fetch all community infos with names
Attached
Detach File
Event Timeline
Log In to Comment