Skip to content
This repository was archived by the owner on Aug 22, 2024. It is now read-only.
This repository was archived by the owner on Aug 22, 2024. It is now read-only.

Unwanted behavior in add route on ZOAuthRoute #47

@arnaud-moncel

Description

@arnaud-moncel

Describe the bug
When you create route & you add some method like this:

route = zoapp.createRoute("/bots");
// Bot create
route.add("POST", "", ["owner, master"], bots.createBot);
// get bots
route.add("GET", "", ["owner", "admin", "master"], bots.getBots);

The restriction for this POST route is ["owner", "admin", "master"].

Expected behavior
I think we should be able to chose perfectly the restriction.
In this example the restriction should be ["owner", "master"] for the POST route.

See

add(method, path, scopes, callback, authCallback = null) {
to fix it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions