[PR #75] [MERGED] 45 create pool routes for backend #267

Closed
opened 2026-02-27 19:17:31 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/EddieTheCubeHead/Stagnum/pull/75
Author: @EddieTheCubeHead
Created: 2/17/2024
Status: Merged
Merged: 2/18/2024
Merged by: @EddieTheCubeHead

Base: masterHead: 45-create-pool-routes-for-backend


📝 Commits (10+)

  • b21de2f 45 base for pool creation route
  • 1e49421 45 base for test and functionality for creating pool from collection
  • ae51b57 Merge branch 'master' into 45-create-pool-routes-for-backend
  • de89892 Pool creation (POST /pool) tested and working for all playable types
  • f63f40d 45 Ensure old pool gets deleted on new creation
  • f0c3bd7 45 Add test case for posting pool from multiple collections
  • f011565 Merge branch 'master' into 45-create-pool-routes-for-backend
  • ecec478 45 Fix pool member parent-children relationship declaration
  • 178b4b0 45 base for add song to pool route
  • 308605f 45 Add song features finalized

📊 Changes

20 files changed (+940 additions, -199 deletions)

View changed files

📝 README.md (+2 -1)
📝 server/README.md (+3 -2)
server/src/alembic/versions/6b917dddd71e_add_model_for_pool_members.py (+40 -0)
server/src/api/pool/dependencies.py (+169 -0)
server/src/api/pool/helpers.py (+21 -0)
📝 server/src/api/pool/models.py (+1 -0)
📝 server/src/api/pool/routes.py (+25 -11)
📝 server/src/api/search/dependencies.py (+1 -2)
📝 server/src/api/search/models.py (+2 -4)
📝 server/src/api/search/routes.py (+2 -2)
📝 server/src/database/entities.py (+21 -2)
📝 server/src/main.py (+8 -4)
📝 server/test/conftest.py (+202 -2)
server/test/pool_features/__init__.py (+0 -0)
server/test/pool_features/add_content_features.py (+88 -0)
server/test/pool_features/conftest.py (+33 -0)
server/test/pool_features/create_pool_features.py (+226 -0)
server/test/pool_features/delete_content_features.py (+63 -0)
server/test/pool_features/get_pool_features.py (+33 -0)
📝 server/test/search_features/conftest.py (+0 -169)

📄 Description

Most added code is in src/api/pool and test/pool_features.

Added the following routes

  • POST /pool Create a new pool for the current user. Supports adding multiple tracks or collections into the pool at once. Deletes the previous pool content for the user.
  • GET /pool Get the current pool
  • POST /pool/content Add a single piece of content into the current pool. This means a track, or a collection.
  • DELETE /pool/content/{uri} Delete a single pice of content from the current pool. Deleting a collection deletes all child tracks.

All changes have tests, and the test set passes on Windows 11 with python 3.12.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/EddieTheCubeHead/Stagnum/pull/75 **Author:** [@EddieTheCubeHead](https://github.com/EddieTheCubeHead) **Created:** 2/17/2024 **Status:** ✅ Merged **Merged:** 2/18/2024 **Merged by:** [@EddieTheCubeHead](https://github.com/EddieTheCubeHead) **Base:** `master` ← **Head:** `45-create-pool-routes-for-backend` --- ### 📝 Commits (10+) - [`b21de2f`](https://github.com/EddieTheCubeHead/Stagnum/commit/b21de2f854d3c58d94c8d293a9a370807275e2d1) 45 base for pool creation route - [`1e49421`](https://github.com/EddieTheCubeHead/Stagnum/commit/1e494210fe8b6814e7a3d5b56fb292ada6f5330d) 45 base for test and functionality for creating pool from collection - [`ae51b57`](https://github.com/EddieTheCubeHead/Stagnum/commit/ae51b57dc193d692d860df9b130a1c2f9a36fe4e) Merge branch 'master' into 45-create-pool-routes-for-backend - [`de89892`](https://github.com/EddieTheCubeHead/Stagnum/commit/de89892b87361fa68f3a84cd0f4bb4eec08939f6) Pool creation (POST /pool) tested and working for all playable types - [`f63f40d`](https://github.com/EddieTheCubeHead/Stagnum/commit/f63f40d42431b6872915a3b31874984d6ec559b1) 45 Ensure old pool gets deleted on new creation - [`f0c3bd7`](https://github.com/EddieTheCubeHead/Stagnum/commit/f0c3bd73fcf087cc867926988c37a3980c3f4150) 45 Add test case for posting pool from multiple collections - [`f011565`](https://github.com/EddieTheCubeHead/Stagnum/commit/f011565cc9865c8214ad116a4016475a98c0ff07) Merge branch 'master' into 45-create-pool-routes-for-backend - [`ecec478`](https://github.com/EddieTheCubeHead/Stagnum/commit/ecec478ad05c7a85c293c1bda7a0fa6f33b0cecc) 45 Fix pool member parent-children relationship declaration - [`178b4b0`](https://github.com/EddieTheCubeHead/Stagnum/commit/178b4b0d965d39067fa612a7e37850b23c03446a) 45 base for add song to pool route - [`308605f`](https://github.com/EddieTheCubeHead/Stagnum/commit/308605f9b600908dbaa007e74cf78b5a780e0721) 45 Add song features finalized ### 📊 Changes **20 files changed** (+940 additions, -199 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+2 -1) 📝 `server/README.md` (+3 -2) ➕ `server/src/alembic/versions/6b917dddd71e_add_model_for_pool_members.py` (+40 -0) ➕ `server/src/api/pool/dependencies.py` (+169 -0) ➕ `server/src/api/pool/helpers.py` (+21 -0) 📝 `server/src/api/pool/models.py` (+1 -0) 📝 `server/src/api/pool/routes.py` (+25 -11) 📝 `server/src/api/search/dependencies.py` (+1 -2) 📝 `server/src/api/search/models.py` (+2 -4) 📝 `server/src/api/search/routes.py` (+2 -2) 📝 `server/src/database/entities.py` (+21 -2) 📝 `server/src/main.py` (+8 -4) 📝 `server/test/conftest.py` (+202 -2) ➕ `server/test/pool_features/__init__.py` (+0 -0) ➕ `server/test/pool_features/add_content_features.py` (+88 -0) ➕ `server/test/pool_features/conftest.py` (+33 -0) ➕ `server/test/pool_features/create_pool_features.py` (+226 -0) ➕ `server/test/pool_features/delete_content_features.py` (+63 -0) ➕ `server/test/pool_features/get_pool_features.py` (+33 -0) 📝 `server/test/search_features/conftest.py` (+0 -169) </details> ### 📄 Description Most added code is in src/api/pool and test/pool_features. Added the following routes - `POST /pool` Create a new pool for the current user. Supports adding multiple tracks or collections into the pool at once. Deletes the previous pool content for the user. - `GET /pool` Get the current pool - `POST /pool/content` Add a single piece of content into the current pool. This means a track, or a collection. - `DELETE /pool/content/{uri}` Delete a single pice of content from the current pool. Deleting a collection deletes all child tracks. All changes have tests, and the test set passes on Windows 11 with python 3.12. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 19:17:31 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Stagnum#267
No description provided.