From e8c1e2c611e6cc783e45abc036ee9d55d3a426d8 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 16 Oct 2024 14:06:49 +0200 Subject: fix(code-style): Adjust JS code to our code style This resolves 68 ESLint warnings about invalid code style. Signed-off-by: Ferdinand Thiessen --- apps/files_external/src/actions/enterCredentialsAction.ts | 9 ++++++++- apps/files_external/src/actions/inlineStorageCheckAction.ts | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'apps/files_external') diff --git a/apps/files_external/src/actions/enterCredentialsAction.ts b/apps/files_external/src/actions/enterCredentialsAction.ts index 29d660315b4..20821298db5 100644 --- a/apps/files_external/src/actions/enterCredentialsAction.ts +++ b/apps/files_external/src/actions/enterCredentialsAction.ts @@ -23,8 +23,15 @@ type CredentialResponse = { password?: string, } +/** + * Set credentials for external storage + * + * @param node The node for which to set the credentials + * @param login The username + * @param password The password + */ async function setCredentials(node: Node, login: string, password: string): Promise { - const configResponse = await axios.put(generateUrl('apps/files_external/userglobalstorages/{id}', node.attributes), { + const configResponse = await axios.put(generateUrl('apps/files_external/userglobalstorages/{id}', { id: node.attributes.id }), { backendOptions: { user: login, password }, }) as AxiosResponse diff --git a/apps/files_external/src/actions/inlineStorageCheckAction.ts b/apps/files_external/src/actions/inlineStorageCheckAction.ts index a213c196b50..42b1d5b3718 100644 --- a/apps/files_external/src/actions/inlineStorageCheckAction.ts +++ b/apps/files_external/src/actions/inlineStorageCheckAction.ts @@ -30,7 +30,8 @@ export const action = new FileAction({ /** * Use this function to check the storage availability * We then update the node attributes directly. - * @param node + * + * @param node The node to render inline */ async renderInline(node: Node) { let config = null as unknown as StorageConfig -- cgit v1.2.3