Skip to content

Commit

Permalink
Fix routes after migrate api to ocs
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos committed May 7, 2023
1 parent f7e7c05 commit ddb42e4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ import Vue from 'vue'
import Router from 'vue-router'
import routes from './router.js'
import store from '../store/index.js'
import { generateUrl } from '@nextcloud/router'

Vue.use(Router)

const libresignVar = store.state.settings

const base = generateOcsUrl('/apps/libresign')
const base = generateUrl('/apps/libresign')

const router = new Router({
mode: 'history',
Expand Down
1 change: 1 addition & 0 deletions src/store/modules/files.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import axios from '@nextcloud/axios'
import { showError } from '@nextcloud/dialogs'
import { generateOcsUrl } from '@nextcloud/router'

const state = {
file: {},
Expand Down
1 change: 0 additions & 1 deletion src/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

import Vue from 'vue'
import Vuex from 'vuex'
import { imagePath } from '@nextcloud/router'
import { loadState } from '@nextcloud/initial-state'
import { translate as t, translatePlural as n } from '@nextcloud/l10n'
import LibresignTab from './views/FilesTab/LibresignTab.vue'
Expand Down
4 changes: 2 additions & 2 deletions src/views/FilesTab/LibresignTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
<script>
import axios from '@nextcloud/axios'
import { showError, showSuccess } from '@nextcloud/dialogs'
import { generateOcsUrl } from '@nextcloud/router'
import { generateUrl, generateOcsUrl } from '@nextcloud/router'
import { get } from 'lodash-es'
import { service as signService, SIGN_STATUS } from '../../domains/sign/index.js'
import { getAPPURL } from '../../helpers/path.js'
Expand Down Expand Up @@ -453,7 +453,7 @@ export default {
this.$refs.request.clearList()
},
redirectToValidation() {
window.location.href = generateOcsUrl(`/apps/libresign/f/validation/${this.fileInfo.id}`)
window.location.href = generateUrl(`/apps/libresign/f/validation/${this.fileInfo.id}`)
},
},
}
Expand Down

0 comments on commit ddb42e4

Please sign in to comment.