Skip to content

Commit

Permalink
Filter driveType via API
Browse files Browse the repository at this point in the history
  • Loading branch information
JanAckermann committed Feb 18, 2022
1 parent 8869e56 commit 9aae261
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions packages/web-app-files/src/views/spaces/Projects.vue
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,8 @@ export default {
const loadResourcesTask = useTask(function* (signal, ref) {
ref.CLEAR_CURRENT_FILES_LIST()
const response = yield graphClient.drives.listMyDrives()
let loadedSpaces = (response.data?.value || [])
.filter((drive) => drive.driveType === 'project')
.sort((a, b) => a.name.localeCompare(b.name))
const response = yield graphClient.drives.listMyDrives('driveType eq project')
let loadedSpaces = (response.data?.value || []).sort((a, b) => a.name.localeCompare(b.name))
loadedSpaces = loadedSpaces.map(buildSpace)
ref.LOAD_FILES({ currentFolder: null, files: loadedSpaces })
Expand Down
4 changes: 2 additions & 2 deletions packages/web-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ const graph = (baseURI: string, axiosClient: AxiosInstance): Graph => {
const meDrivesApi = new MeDrivesApi(config, config.basePath, axiosClient)
const drivesApiFactory = DrivesApiFactory(config, config.basePath, axiosClient)

return {
return <Graph>{
drives: {
listMyDrives: () => meDrivesApi.listMyDrives(),
listMyDrives: (filter?: string) => meDrivesApi.listMyDrives(0, 0, '', filter),
getDrive: (id: string) => drivesApiFactory.getDrive(id),
createDrive: (drive: Drive, options: any): AxiosPromise<Drive> =>
drivesApiFactory.createDrive(drive, options),
Expand Down

0 comments on commit 9aae261

Please sign in to comment.