aboutsummaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2021-07-15 12:46:14 +0000
committerMichaIng <micha@dietpi.com>2021-07-23 15:56:28 +0200
commit6e5191b7021b448a48d741233bd17ab3c222119f (patch)
tree26c353643f5d1dd764d512e1fd15e15168d54346 /core/src
parent229bfcbab56e2de473d2d34bb7d86b5665d4ab35 (diff)
downloadnextcloud-server-6e5191b7021b448a48d741233bd17ab3c222119f.tar.gz
nextcloud-server-6e5191b7021b448a48d741233bd17ab3c222119f.zip
Bump @nextcloud/router from 1.2.0 to 2.0.0
Bumps [@nextcloud/router](https://github.com/nextcloud/nextcloud-router) from 1.2.0 to 2.0.0. - [Release notes](https://github.com/nextcloud/nextcloud-router/releases) - [Changelog](https://github.com/nextcloud/nextcloud-router/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/nextcloud-router/compare/v1.2.0...v2.0.0) Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
Diffstat (limited to 'core/src')
-rw-r--r--core/src/OCP/appconfig.js3
-rw-r--r--core/src/OCP/whatsnew.js7
-rw-r--r--core/src/services/UnifiedSearchService.js4
3 files changed, 7 insertions, 7 deletions
diff --git a/core/src/OCP/appconfig.js b/core/src/OCP/appconfig.js
index 6e18f591894..d8c8c152a37 100644
--- a/core/src/OCP/appconfig.js
+++ b/core/src/OCP/appconfig.js
@@ -22,6 +22,7 @@
*/
import $ from 'jquery'
+import { generateOcsUrl } from '@nextcloud/router'
import OC from '../OC/index'
@@ -43,7 +44,7 @@ function call(method, endpoint, options) {
options = options || {}
$.ajax({
type: method.toUpperCase(),
- url: OC.linkToOCS('apps/provisioning_api/api/v1', 2) + 'config/apps' + endpoint,
+ url: generateOcsUrl('apps/provisioning_api/api/v1/config/apps') + endpoint,
data: options.data || {},
success: options.success,
error: options.error,
diff --git a/core/src/OCP/whatsnew.js b/core/src/OCP/whatsnew.js
index afcffb7c34f..ac455ffc08b 100644
--- a/core/src/OCP/whatsnew.js
+++ b/core/src/OCP/whatsnew.js
@@ -23,15 +23,14 @@
import _ from 'underscore'
import $ from 'jquery'
-
-import OC from '../OC/index'
+import { generateOcsUrl } from '@nextcloud/router'
export function query(options) {
options = options || {}
const dismissOptions = options.dismiss || {}
$.ajax({
type: 'GET',
- url: options.url || OC.linkToOCS('core', 2) + 'whatsnew?format=json',
+ url: options.url || generateOcsUrl('core/whatsnew?format=json'),
success: options.success || function(data, statusText, xhr) {
onQuerySuccess(data, statusText, xhr, dismissOptions)
},
@@ -43,7 +42,7 @@ export function dismiss(version, options) {
options = options || {}
$.ajax({
type: 'POST',
- url: options.url || OC.linkToOCS('core', 2) + 'whatsnew',
+ url: options.url || generateOcsUrl('core/whatsnew'),
data: { version: encodeURIComponent(version) },
success: options.success || onDismissSuccess,
error: options.error || onDismissError,
diff --git a/core/src/services/UnifiedSearchService.js b/core/src/services/UnifiedSearchService.js
index 09d0d02fedf..a838d61bfd6 100644
--- a/core/src/services/UnifiedSearchService.js
+++ b/core/src/services/UnifiedSearchService.js
@@ -45,7 +45,7 @@ const createCancelToken = () => axios.CancelToken.source()
*/
export async function getTypes() {
try {
- const { data } = await axios.get(generateOcsUrl('search', 2) + 'providers', {
+ const { data } = await axios.get(generateOcsUrl('search/providers'), {
params: {
// Sending which location we're currently at
from: window.location.pathname.replace('/index.php', '') + window.location.search,
@@ -76,7 +76,7 @@ export function search({ type, query, cursor }) {
*/
const cancelToken = createCancelToken()
- const request = async() => axios.get(generateOcsUrl('search', 2) + `providers/${type}/search`, {
+ const request = async() => axios.get(generateOcsUrl('search/providers/{type}/search', { type }), {
cancelToken: cancelToken.token,
params: {
term: query,