Skip to content

How to implement node-mongo-tenant with node-restful? Newbie Question #58

@ringued

Description

@ringued

Hi, I'm am trying to implement node_mongo_tenant with node-restful for my app, but I am struggling figuring out a way to make work.
When I define the byTenant method soon after the model, and before registering the route on node-restful, I must know the Tenant(user) by the time. As the user is going to be known only after login and the route with pre-determined tenant is already registered, I can't find a way to change the tenant constant so it will apply the right tenant to the route.
I thought on registering the route after login as solution, but it would have serious implications for the app. Is there any smarter idea? As u may see, it's a newbie question. Thanks

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