Skip to content

rbac-client doesn't work with an object as a param #372

@riccardo-forina

Description

@riccardo-forina

When using rbac-client, if we send a getWorkspace request using inline arguments:

const workspaceId = `foo-bar-baz`
getWorkspace(workspaceId, true, {})

we get a properly formed URL:

/api/rbac/v2/workspaces/foo-bar-baz/

If we send a request using a params object - which is the style we'd like to use, so to avoid passing optional args to the call - like so:

const workspaceId = `foo-bar-baz`
getWorkspace({ id: workspaceId })

we get a malformed URL:

/api/rbac/v2/workspaces/[object Object]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions