mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 14:44:05 -08:00
9a1cc56806
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
16 lines
555 B
TypeScript
16 lines
555 B
TypeScript
import type { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-workflow';
|
|
import { cockpitApiRequest } from './GenericFunctions';
|
|
|
|
export async function getSingleton(
|
|
this: IExecuteFunctions | ILoadOptionsFunctions,
|
|
resourceName: string,
|
|
): Promise<any> {
|
|
return await cockpitApiRequest.call(this, 'get', `/singletons/get/${resourceName}`);
|
|
}
|
|
|
|
export async function getAllSingletonNames(
|
|
this: IExecuteFunctions | ILoadOptionsFunctions,
|
|
): Promise<string[]> {
|
|
return await cockpitApiRequest.call(this, 'GET', '/singletons/listSingletons', {});
|
|
}
|