Skip to content

Support VFS methods with no argument #788

@mahsashadi

Description

@mahsashadi

Hi @andersevenrud
Due to this comment, imagine we have capabilities method with no argument in client-sie:
method call:

vfs.capabilities();

osjs-client/src/vfs.js

export const capabilities = (adapter, mount) => () => {
  const cached = capabilityCache[mount.name];
  if (cached) {
    return Promise.resolve(cached);
  }
  return adapter.capabilities(mount)
    .then(capabilities => {
      capabilityCache[mount.name] = capabilities;
      return capabilities;
    });
};

osjs-client/src/adapters/vfs/system.js

    capabilities: () => request('capabilities', {}, 'json').then(({body}) => {
      return body;
    }),

But server-side needs path argument to find the mountpoint here. I 've tried to solve it, but did not come up with solution!

Activity

mahsashadi

mahsashadi commented on Jan 19, 2022

@mahsashadi
Author

@andersevenrud sorry for re-mentioning

andersevenrud

andersevenrud commented on Jul 28, 2022

@andersevenrud
Member

Closing because #804 superseeds this and there's already an ongoing discussion :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @andersevenrud@mahsashadi

      Issue actions

        Support VFS methods with no argument · Issue #788 · os-js/OS.js