All checks were successful
Frontend CI / build (push) Successful in 1m8s
### Description This PR introduces full CRUD (Create, Read, Update) functionality for post labels, implemented by following the existing Clean Architecture. #### Backend * **New API Endpoints for Label Management:** * `POST /label`: Create a new label (**authentication required**). * `PUT /label/{id}`: Update a label by its ID (**authentication required**). * `GET /label`: Get all labels. * **Architectural Implementation:** * **Delivery Layer**: Added `CreateLabelRequestDto`, `UpdateLabelRequestDto`, and updated `PostController` with methods to handle label-related operations. * **Application Layer**: Created corresponding use cases (`CreateLabelUseCase`, `UpdateLabelUseCase`, `GetAllLabelsUseCase`) to handle business logic. * **Gateway/Framework Layer**: Implemented `LabelRepository` and `LabelDbService` to manage database interactions, including creating, updating, and querying labels. * **Route Adjustment:** * The route for fetching all post info has been changed from `GET /post/all` to `GET /post` to be more RESTful. #### Frontend * **API Call Update:** * To match the backend route change, the API path for fetching all posts is updated from `/post/all` to `/post`. ### Package Changes _No response_ ### Screenshots _No response_ ### Reference Resolves #105 ### Checklist - [x] A milestone is set - [x] The related issuse has been linked to this branch Reviewed-on: #107 Co-authored-by: SquidSpirit <squid@squidspirit.com> Co-committed-by: SquidSpirit <squid@squidspirit.com>
Backend
Development
SQL Migration
-
Install sqlx
cargo install sqlx-cli
-
Run migration
sqlx migrate run
Run Project
-
Prepare for sql schema setup
cargo sqlx prepare --workspace
-
Run the server
RUST_LOG=debug cargo run
-
(Optional) Hot restart
-
Install
watchexec
-
Run the server with
watchexec
RUST_LOG=debug watchexec -e rs -r 'cargo run'
-