Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3368421
D8330.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
779 B
Referenced Files
None
Subscribers
None
D8330.diff
View Options
diff --git a/keyserver/src/fetchers/user-fetchers.js b/keyserver/src/fetchers/user-fetchers.js
--- a/keyserver/src/fetchers/user-fetchers.js
+++ b/keyserver/src/fetchers/user-fetchers.js
@@ -374,6 +374,12 @@
return row.username;
}
+async function fetchAllUsernames(): Promise<string[]> {
+ const query = SQL`SELECT username FROM users`;
+ const [result] = await dbQuery(query);
+ return result.map(row => row.username);
+}
+
async function fetchKeyserverAdminID(): Promise<?string> {
const changeRoleExtractString = `$.${threadPermissions.CHANGE_ROLE}`;
const query = SQL`
@@ -415,6 +421,7 @@
fetchCurrentUserInfo,
fetchAllUserIDs,
fetchUsername,
+ fetchAllUsernames,
fetchKnownUserInfos,
fetchKeyserverAdminID,
fetchUserIDForEthereumAddress,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 7:47 PM (21 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2585949
Default Alt Text
D8330.diff (779 B)
Attached To
Mode
D8330: [keyserver] fetchUsernames helper function
Attached
Detach File
Event Timeline
Log In to Comment