refactor(editor): Stricter linting for promises and async functions (no-changelog) (#4642)
This commit is contained in:
@@ -1,27 +1,27 @@
|
||||
import type { ILdapConfig, ILdapSyncData, IRestApiContext } from '@/Interface';
|
||||
import { makeRestApiRequest } from '@/utils';
|
||||
import { makeRestApiRequest } from '@/utils/apiUtils';
|
||||
import type { IDataObject } from 'n8n-workflow';
|
||||
|
||||
export function getLdapConfig(context: IRestApiContext): Promise<ILdapConfig> {
|
||||
export async function getLdapConfig(context: IRestApiContext): Promise<ILdapConfig> {
|
||||
return makeRestApiRequest(context, 'GET', '/ldap/config');
|
||||
}
|
||||
|
||||
export function testLdapConnection(context: IRestApiContext): Promise<{}> {
|
||||
export async function testLdapConnection(context: IRestApiContext): Promise<{}> {
|
||||
return makeRestApiRequest(context, 'POST', '/ldap/test-connection');
|
||||
}
|
||||
|
||||
export function updateLdapConfig(
|
||||
export async function updateLdapConfig(
|
||||
context: IRestApiContext,
|
||||
adConfig: ILdapConfig,
|
||||
): Promise<ILdapConfig> {
|
||||
return makeRestApiRequest(context, 'PUT', '/ldap/config', adConfig as unknown as IDataObject);
|
||||
}
|
||||
|
||||
export function runLdapSync(context: IRestApiContext, data: IDataObject): Promise<{}> {
|
||||
export async function runLdapSync(context: IRestApiContext, data: IDataObject): Promise<{}> {
|
||||
return makeRestApiRequest(context, 'POST', '/ldap/sync', data as unknown as IDataObject);
|
||||
}
|
||||
|
||||
export function getLdapSynchronizations(
|
||||
export async function getLdapSynchronizations(
|
||||
context: IRestApiContext,
|
||||
pagination: { page: number },
|
||||
): Promise<ILdapSyncData[]> {
|
||||
|
||||
Reference in New Issue
Block a user