aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src/collaborationresourceshandler.js
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-09-25 18:19:42 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-10-01 17:16:09 +0200
commitb9bc2417e7a8dc81feb0abe20359bedaf864f790 (patch)
tree61b47fbf37c1d168da8625224debde9e6a985348 /apps/files_sharing/src/collaborationresourceshandler.js
parent7fb651235128dcbca8a6683b5cdafdf835f46300 (diff)
downloadnextcloud-server-b9bc2417e7a8dc81feb0abe20359bedaf864f790.tar.gz
nextcloud-server-b9bc2417e7a8dc81feb0abe20359bedaf864f790.zip
Comply to eslint
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing/src/collaborationresourceshandler.js')
-rw-r--r--apps/files_sharing/src/collaborationresourceshandler.js22
1 files changed, 12 insertions, 10 deletions
diff --git a/apps/files_sharing/src/collaborationresourceshandler.js b/apps/files_sharing/src/collaborationresourceshandler.js
index 32e9f17ad77..1e1ebe5b541 100644
--- a/apps/files_sharing/src/collaborationresourceshandler.js
+++ b/apps/files_sharing/src/collaborationresourceshandler.js
@@ -1,19 +1,21 @@
-__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/');
-__webpack_nonce__ = btoa(OC.requestToken);
+// eslint-disable-next-line camelcase
+__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/')
+// eslint-disable-next-line camelcase
+__webpack_nonce__ = btoa(OC.requestToken)
window.OCP.Collaboration.registerType('file', {
action: () => {
return new Promise((resolve, reject) => {
- OC.dialogs.filepicker(t('files_sharing', 'Link to a file'), function (f) {
- const client = OC.Files.getClient();
+ OC.dialogs.filepicker(t('files_sharing', 'Link to a file'), function(f) {
+ const client = OC.Files.getClient()
client.getFileInfo(f).then((status, fileInfo) => {
- resolve(fileInfo.id);
+ resolve(fileInfo.id)
}).fail(() => {
- reject();
- });
- }, false, null, false, OC.dialogs.FILEPICKER_TYPE_CHOOSE, '', { allowDirectoryChooser: true });
- });
+ reject(new Error('Cannot get fileinfo'))
+ })
+ }, false, null, false, OC.dialogs.FILEPICKER_TYPE_CHOOSE, '', { allowDirectoryChooser: true })
+ })
},
typeString: t('files_sharing', 'Link to a file'),
typeIconClass: 'icon-files-dark'
-});
+})