mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 21:19:43 -08:00
15 lines
635 B
TypeScript
15 lines
635 B
TypeScript
import {
|
|
IExecuteFunctions,
|
|
IExecuteSingleFunctions,
|
|
ILoadOptionsFunctions
|
|
} from 'n8n-core';
|
|
import { cockpitApiRequest } from './GenericFunctions';
|
|
|
|
export async function getSingleton(this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, resourceName: string): Promise<any> { // tslint:disable-line:no-any
|
|
return cockpitApiRequest.call(this, 'get', `/singletons/get/${resourceName}`);
|
|
}
|
|
|
|
export async function getAllSingletonNames(this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions): Promise<string[]> {
|
|
return cockpitApiRequest.call(this, 'GET', `/singletons/listSingletons`, {});
|
|
}
|