refactor(editor): Stricter linting for promises and async functions (no-changelog) (#4642)

This commit is contained in:
Michael Kret
2023-05-10 18:10:03 +03:00
committed by GitHub
parent 1b1dc0e655
commit ed3bc154b0
114 changed files with 351 additions and 344 deletions

View File

@@ -1,14 +1,14 @@
import type { IRestApiContext } from '@/Interface';
import { makeRestApiRequest } from '@/utils';
import { makeRestApiRequest } from '@/utils/apiUtils';
export function getApiKey(context: IRestApiContext): Promise<{ apiKey: string | null }> {
export async function getApiKey(context: IRestApiContext): Promise<{ apiKey: string | null }> {
return makeRestApiRequest(context, 'GET', '/me/api-key');
}
export function createApiKey(context: IRestApiContext): Promise<{ apiKey: string | null }> {
export async function createApiKey(context: IRestApiContext): Promise<{ apiKey: string | null }> {
return makeRestApiRequest(context, 'POST', '/me/api-key');
}
export function deleteApiKey(context: IRestApiContext): Promise<{ success: boolean }> {
export async function deleteApiKey(context: IRestApiContext): Promise<{ success: boolean }> {
return makeRestApiRequest(context, 'DELETE', '/me/api-key');
}