Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
Merge pull request #61 from owncloud/fix-js-client
Browse files Browse the repository at this point in the history
Fix js client
  • Loading branch information
kulmann authored Aug 26, 2020
2 parents 96a163a + 3a62562 commit 4034a7c
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 6 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/fix-fetching-bundles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Fix fetching bundles in settings UI

We fixed the settings UI to use the changed API endpoint `BundleService.ListBundles` properly.

https://github.com/owncloud/ocis-settings/pull/61

6 changes: 3 additions & 3 deletions pkg/assets/embed.go

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions ui/client/settings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,52 @@ export const BundleService_RemoveSettingFromBundleURL = function(parameters = {}
let keys = Object.keys(queryParameters)
return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '')
}
/**
*
* request: PermissionService_ListPermissionsByResource
* url: PermissionService_ListPermissionsByResourceURL
* method: PermissionService_ListPermissionsByResource_TYPE
* raw_url: PermissionService_ListPermissionsByResource_RAW_URL
* @param body -
*/
export const PermissionService_ListPermissionsByResource = function(parameters = {}) {
const domain = parameters.$domain ? parameters.$domain : getDomain()
const config = parameters.$config
let path = '/api/v0/settings/permissions-list-by-resource'
let body
let queryParameters = {}
let form = {}
if (parameters['body'] !== undefined) {
body = parameters['body']
}
if (parameters['body'] === undefined) {
return Promise.reject(new Error('Missing required parameter: body'))
}
if (parameters.$queryParameters) {
Object.keys(parameters.$queryParameters).forEach(function(parameterName) {
queryParameters[parameterName] = parameters.$queryParameters[parameterName]
});
}
return request('post', domain + path, body, queryParameters, form, config)
}
export const PermissionService_ListPermissionsByResource_RAW_URL = function() {
return '/api/v0/settings/permissions-list-by-resource'
}
export const PermissionService_ListPermissionsByResource_TYPE = function() {
return 'post'
}
export const PermissionService_ListPermissionsByResourceURL = function(parameters = {}) {
let queryParameters = {}
const domain = parameters.$domain ? parameters.$domain : getDomain()
let path = '/api/v0/settings/permissions-list-by-resource'
if (parameters.$queryParameters) {
Object.keys(parameters.$queryParameters).forEach(function(parameterName) {
queryParameters[parameterName] = parameters.$queryParameters[parameterName]
})
}
let keys = Object.keys(queryParameters)
return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '')
}
/**
*
* request: RoleService_ListRoles
Expand Down
4 changes: 1 addition & 3 deletions ui/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ const actions = {
try {
const response = await BundleService_ListBundles({
$domain: rootGetters.configuration.server,
body: {
accountUuid: 'me'
}
body: {}
})
if (response.status === 201) {
// the settings markup has implicit typing. inject an explicit type variable here
Expand Down

0 comments on commit 4034a7c

Please sign in to comment.