mirror of
https://github.com/unraid/api.git
synced 2025-12-31 13:39:52 -06:00
fix: find by key, not ID
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"createdAt": "2024-12-19T16:49:56.848Z",
|
||||
"createdAt": "2024-12-19T17:32:59.531Z",
|
||||
"description": "API key for Connect user",
|
||||
"id": "d166bf8b-3615-444a-8932-c460b2132ba3",
|
||||
"key": "3a4e2332891e879d2ac8c3f25ef03a7b54f70b62cd6c5a08a86189cdd19ba203",
|
||||
|
||||
@@ -13,7 +13,7 @@ export const createLocalApiKeyForConnectIfNecessary = async () => {
|
||||
const { remote } = getters.config();
|
||||
const service = new ApiKeyService();
|
||||
// If the remote API Key is set and the local key is either not set or not found on disk, create a key
|
||||
if (remote.apikey && (!remote.localApiKey || !(await service.findById(remote.localApiKey)))) {
|
||||
if (remote.apikey && (!remote.localApiKey || !(await service.findByKey(remote.localApiKey)))) {
|
||||
minigraphLogger.debug('Creating local API key for Connect');
|
||||
// Create local API key
|
||||
const apiKeyService = new ApiKeyService();
|
||||
|
||||
Reference in New Issue
Block a user