refactor: Lint for no unneeded backticks (#5057) (no-changelog)
* ✨ 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`
This commit is contained in:
@@ -29,7 +29,7 @@ export async function createNewCredential(
|
||||
context: IRestApiContext,
|
||||
data: ICredentialsDecrypted,
|
||||
): Promise<ICredentialsResponse> {
|
||||
return makeRestApiRequest(context, 'POST', `/credentials`, data as unknown as IDataObject);
|
||||
return makeRestApiRequest(context, 'POST', '/credentials', data as unknown as IDataObject);
|
||||
}
|
||||
|
||||
export async function deleteCredential(context: IRestApiContext, id: string): Promise<boolean> {
|
||||
@@ -61,7 +61,7 @@ export async function oAuth1CredentialAuthorize(
|
||||
return makeRestApiRequest(
|
||||
context,
|
||||
'GET',
|
||||
`/oauth1-credential/auth`,
|
||||
'/oauth1-credential/auth',
|
||||
data as unknown as IDataObject,
|
||||
);
|
||||
}
|
||||
@@ -74,7 +74,7 @@ export async function oAuth2CredentialAuthorize(
|
||||
return makeRestApiRequest(
|
||||
context,
|
||||
'GET',
|
||||
`/oauth2-credential/auth`,
|
||||
'/oauth2-credential/auth',
|
||||
data as unknown as IDataObject,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -88,14 +88,14 @@ export function updateCurrentUser(
|
||||
context: IRestApiContext,
|
||||
params: { id: string; firstName: string; lastName: string; email: string },
|
||||
): Promise<IUserResponse> {
|
||||
return makeRestApiRequest(context, 'PATCH', `/me`, params as unknown as IDataObject);
|
||||
return makeRestApiRequest(context, 'PATCH', '/me', params as unknown as IDataObject);
|
||||
}
|
||||
|
||||
export function updateCurrentUserPassword(
|
||||
context: IRestApiContext,
|
||||
params: { newPassword: string; currentPassword: string },
|
||||
): Promise<void> {
|
||||
return makeRestApiRequest(context, 'PATCH', `/me/password`, params);
|
||||
return makeRestApiRequest(context, 'PATCH', '/me/password', params);
|
||||
}
|
||||
|
||||
export async function deleteUser(
|
||||
|
||||
@@ -3,7 +3,7 @@ import { IDataObject } from 'n8n-workflow';
|
||||
import { makeRestApiRequest } from '@/utils';
|
||||
|
||||
export async function getNewWorkflow(context: IRestApiContext, name?: string) {
|
||||
const response = await makeRestApiRequest(context, 'GET', `/workflows/new`, name ? { name } : {});
|
||||
const response = await makeRestApiRequest(context, 'GET', '/workflows/new', name ? { name } : {});
|
||||
return {
|
||||
name: response.name,
|
||||
onboardingFlowEnabled: response.onboardingFlowEnabled === true,
|
||||
@@ -13,11 +13,11 @@ export async function getNewWorkflow(context: IRestApiContext, name?: string) {
|
||||
export async function getWorkflows(context: IRestApiContext, filter?: object) {
|
||||
const sendData = filter ? { filter } : undefined;
|
||||
|
||||
return await makeRestApiRequest(context, 'GET', `/workflows`, sendData);
|
||||
return await makeRestApiRequest(context, 'GET', '/workflows', sendData);
|
||||
}
|
||||
|
||||
export async function getActiveWorkflows(context: IRestApiContext) {
|
||||
return await makeRestApiRequest(context, 'GET', `/active`);
|
||||
return await makeRestApiRequest(context, 'GET', '/active');
|
||||
}
|
||||
|
||||
export async function getCurrentExecutions(context: IRestApiContext, filter: IDataObject) {
|
||||
|
||||
Reference in New Issue
Block a user