mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-15 17:14:05 -08:00
d9b98fc8be
* ✨ Create rule `no-unneeded-backticks` * 👕 Enable rule * ⚡ Run rule on `cli` * ⚡ Run rule on `core` * ⚡ Run rule on `workflow` * ⚡ Rule rule on `design-system` * ⚡ Run rule on `node-dev` * ⚡ Run rule on `editor-ui` * ⚡ Run rule on `nodes-base`
16 lines
611 B
TypeScript
16 lines
611 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> {
|
|
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', {});
|
|
}
|