Skip to content

refactor route handlers into separate function #21

@AdamVerner

Description

@AdamVerner

The route handlers, such as resource_list_handler, should be divided into two functions:

  • one taking the AdminTableRoute.RouteRequest, which will parse parametrs and pass them to the second function
  • seconf function taking parsed parametrs and performing the actual logic (such as resolving list of items)

this will enable easier testing in user applications, where the test function could just call the second method, instead of creating request object with a lot of irrelevant data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions