Page MenuHomePhabricator

D13755.id.diff
No OneTemporary

D13755.id.diff

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

Mime Type
text/plain
Expires
Thu, Nov 21, 8:29 AM (33 m, 7 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2555363
Default Alt Text
D13755.id.diff (1 KB)

Event Timeline