Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API overhaul: refactor API folder structure #157

Closed
Tracked by #141
josecelano opened this issue Jan 16, 2023 · 1 comment · Fixed by #237
Closed
Tracked by #141

API overhaul: refactor API folder structure #157

josecelano opened this issue Jan 16, 2023 · 1 comment · Fixed by #237
Assignees
Labels
Code Cleanup / Refactoring Tidying and Making Neat

Comments

@josecelano
Copy link
Member

josecelano commented Jan 16, 2023

Parent issue: #141
From PR comment: #152 (comment)

From:

src/apis/
├── handlers.rs
├── middlewares
│   ├── auth.rs
│   └── mod.rs
├── mod.rs
├── resources
│   ├── auth_key.rs
│   ├── mod.rs
│   ├── peer.rs
│   ├── stats.rs
│   └── torrent.rs
├── responses.rs
├── routes.rs
└── server.rs

To:

└── src
    ├── apis
    │   ├── contexts
    │   │   ├── auth_key
    │   │   │   ├── handlers.rs
    │   │   │   ├── mod.rs
    │   │   │   ├── resources.rs
    │   │   │   ├── responses.rs
    │   │   │   └── routes.rs
    │   │   ├── mod.rs
    │   │   ├── stats
    │   │   │   ├── handlers.rs
    │   │   │   ├── mod.rs
    │   │   │   ├── resources.rs
    │   │   │   ├── responses.rs
    │   │   │   └── routes.rs
    │   │   ├── torrent
    │   │   │   ├── handlers.rs
    │   │   │   ├── mod.rs
    │   │   │   ├── resources.rs
    │   │   │   ├── responses.rs
    │   │   │   └── routes.rs
    │   │   └── whitelist
    │   │       ├── handlers.rs
    │   │       ├── mod.rs
    │   │       ├── resources.rs
    │   │       ├── responses.rs
    │   │       └── routes.rs
    │   ├── middlewares
    │   │   ├── auth.rs
    │   │   └── mod.rs
    │   ├── mod.rs
    │   ├── routes.rs
    │   └── server.rs
    └── mod.rs
@josecelano josecelano added the Code Cleanup / Refactoring Tidying and Making Neat label Jan 16, 2023
@josecelano josecelano mentioned this issue Jan 16, 2023
4 tasks
@da2ce7
Copy link
Contributor

da2ce7 commented Jan 23, 2023

This is great!

@josecelano josecelano self-assigned this Mar 10, 2023
josecelano added a commit to josecelano/torrust-tracker that referenced this issue Mar 10, 2023
@josecelano josecelano linked a pull request Mar 10, 2023 that will close this issue
8 tasks
josecelano added a commit to josecelano/torrust-tracker that referenced this issue Mar 10, 2023
josecelano added a commit to josecelano/torrust-tracker that referenced this issue Mar 10, 2023
josecelano added a commit to josecelano/torrust-tracker that referenced this issue Mar 10, 2023
josecelano added a commit to josecelano/torrust-tracker that referenced this issue Mar 10, 2023
@josecelano josecelano changed the title Refactor API folder structure API overhaul: refactor API folder structure Mar 12, 2023
josecelano added a commit that referenced this issue Mar 12, 2023
8fe52c3 refactor(api): reorganize api tests in contexts (Jose Celano)
19d33b4 refactor: [#157] extract API contexts (Jose Celano)

Pull request description:

  Reorganize API in contexts:

  Production code:

  - [x] Extract API context `auth_key`.
  - [x] Extract API context `stats`.
  - [x] Extract API context `torrent`.
  - [x] Extract API context `whitelist`.

  Integration tests:

  - [x] Extract test for context `auth_key`.
  - [x] Extract test for context `stats`.
  - [x] Extract test for context `torrent`.
  - [x] Extract test for context `whitelist`.

Top commit has no ACKs.

Tree-SHA512: a1a7a85654658a2f5d7a9c40930033c7384d1cc543d6113a8ab3dc2a4ef2615e1a7a045a630908e0994dfea7bfe4671c6d1815d4418f15db2d89d34124d1a256
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Cleanup / Refactoring Tidying and Making Neat
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants