Skip to content

Move "api.js" into its own place #29

@dpordomingo

Description

@dpordomingo

from #16 (comment)

We could move frontend/src/api.js into its own place as done in CAT for example.

I see two reasons:

  • first one is kindof opinionated: imo the root dir should be populated with as fewer things as possible because it helps to understand better the structure of the code.
  • second one is generic: now we have in this file the logic (copy-pasted from cat) to connect with the API (business agnostic), and also the "repository-like" code (business related). Splitting both parts properly, and moving business agnostic to a service, and the business logic to a repository would help us to reuse and test better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions