Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3327212
D13755.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13755.diff
View Options
diff --git a/keyserver/src/utils/fc-cache.js b/keyserver/src/utils/fc-cache.js
--- a/keyserver/src/utils/fc-cache.js
+++ b/keyserver/src/utils/fc-cache.js
@@ -1,6 +1,5 @@
// @flow
-import { getCommConfig } from 'lib/utils/comm-config.js';
import {
getFCNames as baseGetFCNames,
type GetFCNames,
@@ -9,19 +8,13 @@
import { FCCache } from 'lib/utils/fc-cache.js';
import { NeynarClient } from 'lib/utils/neynar-client.js';
-type NeynarConfig = {
- +key: string,
- +signerUUID?: string,
- +neynarWebhookSecret?: string,
-};
+import { getNeynarConfig } from './neynar-utils.js';
let getFCNames: ?GetFCNames;
let neynarClient: ?NeynarClient;
async function initFCCache() {
- const neynarSecret = await getCommConfig<NeynarConfig>({
- folder: 'secrets',
- name: 'neynar',
- });
+ const neynarSecret = await getNeynarConfig();
+
const neynarKey = neynarSecret?.key;
if (!neynarKey) {
return;
diff --git a/keyserver/src/utils/neynar-utils.js b/keyserver/src/utils/neynar-utils.js
new file mode 100644
--- /dev/null
+++ b/keyserver/src/utils/neynar-utils.js
@@ -0,0 +1,18 @@
+// @flow
+
+import { getCommConfig } from 'lib/utils/comm-config.js';
+
+type NeynarConfig = {
+ +key: string,
+ +signerUUID?: string,
+ +neynarWebhookSecret?: string,
+};
+
+function getNeynarConfig(): Promise<?NeynarConfig> {
+ return getCommConfig<NeynarConfig>({
+ folder: 'secrets',
+ name: 'neynar',
+ });
+}
+
+export { getNeynarConfig };
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 21, 8:30 AM (4 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2555363
Default Alt Text
D13755.diff (1 KB)
Attached To
Mode
D13755: [keyserver] moving getting neynar config to function
Attached
Detach File
Event Timeline
Log In to Comment