Skip to content

Commit 3c3fa1e

Browse files
committed
fix: find by key, not ID
1 parent afe53c3 commit 3c3fa1e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

api/dev/keys/d166bf8b-3615-444a-8932-c460b2132ba3.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"createdAt": "2024-12-19T16:49:56.848Z",
2+
"createdAt": "2024-12-19T17:32:59.531Z",
33
"description": "API key for Connect user",
44
"id": "d166bf8b-3615-444a-8932-c460b2132ba3",
55
"key": "3a4e2332891e879d2ac8c3f25ef03a7b54f70b62cd6c5a08a86189cdd19ba203",

api/src/mothership/utils/create-local-connect-api-key.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const createLocalApiKeyForConnectIfNecessary = async () => {
1313
const { remote } = getters.config();
1414
const service = new ApiKeyService();
1515
// If the remote API Key is set and the local key is either not set or not found on disk, create a key
16-
if (remote.apikey && (!remote.localApiKey || !(await service.findById(remote.localApiKey)))) {
16+
if (remote.apikey && (!remote.localApiKey || !(await service.findByKey(remote.localApiKey)))) {
1717
minigraphLogger.debug('Creating local API key for Connect');
1818
// Create local API key
1919
const apiKeyService = new ApiKeyService();

0 commit comments

Comments
 (0)