Skip to content

Commit

Permalink
Merge pull request #20867 from nextcloud/warnigns/js/workflowengine
Browse files Browse the repository at this point in the history
Fix linter warnings in workflowengine
  • Loading branch information
rullzer authored May 8, 2020
2 parents 02b1420 + e3bb6b6 commit d476c7a
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 25 deletions.
40 changes: 20 additions & 20 deletions apps/workflowengine/js/workflowengine.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/workflowengine/js/workflowengine.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions apps/workflowengine/src/components/Checks/FileMimeType.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<script>
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
import valueMixin from './../../mixins/valueMixin'
import { imagePath } from '@nextcloud/router'

export default {
name: 'FileMimeType',
Expand All @@ -76,12 +77,12 @@ export default {
pattern: '/image\\/.*/',
},
{
iconUrl: OC.imagePath('core', 'filetypes/x-office-document'),
iconUrl: imagePath('core', 'filetypes/x-office-document'),
label: t('workflowengine', 'Office documents'),
pattern: '/(vnd\\.(ms-|openxmlformats-).*)$/',
},
{
iconUrl: OC.imagePath('core', 'filetypes/application-pdf'),
iconUrl: imagePath('core', 'filetypes/application-pdf'),
label: t('workflowengine', 'PDF documents'),
pattern: 'application/pdf',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<script>
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
import axios from '@nextcloud/axios'
import { generateOcsUrl } from '@nextcloud/router'

const groups = []
const status = {
Expand Down Expand Up @@ -83,7 +84,7 @@ export default {
}

this.status.isLoading = true
return axios.get(OC.linkToOCS('cloud', 2) + 'groups?limit=20&search=' + encodeURI(searchQuery)).then((response) => {
return axios.get(generateOcsUrl('cloud', 2) + 'groups?limit=20&search=' + encodeURI(searchQuery)).then((response) => {
response.data.ocs.data.groups.reduce((obj, item) => {
obj.push({
id: item,
Expand Down
3 changes: 2 additions & 1 deletion apps/workflowengine/src/helpers/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@
*/

import { loadState } from '@nextcloud/initial-state'
import { generateOcsUrl } from '@nextcloud/router'

const scopeValue = loadState('workflowengine', 'scope') === 0 ? 'global' : 'user'

const getApiUrl = (url) => {
return OC.linkToOCS('apps/workflowengine/api/v1/workflows', 2) + scopeValue + url + '?format=json'
return generateOcsUrl('apps/workflowengine/api/v1/workflows', 2) + scopeValue + url + '?format=json'
}

export {
Expand Down

0 comments on commit d476c7a

Please sign in to comment.