diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-10-16 14:06:49 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-10-16 22:11:59 +0200 |
commit | e8c1e2c611e6cc783e45abc036ee9d55d3a426d8 (patch) | |
tree | 6b4f1f6868a9734f9c589a058a9e716fecaef421 /apps/files_external | |
parent | 5be832344eacb8328600d256c3090671c3f582d2 (diff) | |
download | nextcloud-server-e8c1e2c611e6cc783e45abc036ee9d55d3a426d8.tar.gz nextcloud-server-e8c1e2c611e6cc783e45abc036ee9d55d3a426d8.zip |
fix(code-style): Adjust JS code to our code style
This resolves 68 ESLint warnings about invalid code style.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/src/actions/enterCredentialsAction.ts | 9 | ||||
-rw-r--r-- | apps/files_external/src/actions/inlineStorageCheckAction.ts | 3 |
2 files changed, 10 insertions, 2 deletions
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<null|true> { - 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<StorageConfig> 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 |