Skip to content

Commit 8f4679c

Browse files
authored
Implement missing routes (#211)
* Add support for updating articles and API spec enhancements Introduced `updateArticle` functionality in the ArticleService, allowing users to update articles while validating permissions. Updated SQL queries to handle partial updates and added corresponding Ktor API route. Also included an OpenAPI spec and API test script for better API documentation and testing. * Add deleteArticle functionality to ArticleService This commit introduces the ability to delete an article by slug if the requesting user is the author. It includes changes to the service, persistence layer, and routes to handle the delete operation with proper authorization checks. * Add support for favoriting and deleting comments Introduce functionalities to favorite/unfavorite articles and delete comments. Updated persistence, services, and routes to handle these actions, including new domain errors for comment-related operations. Modified SQL queries and methods to ensure proper comment management. * Refactor ArticleService and improve comment handling logic Refactored `ArticleService` for better modularity and readability, introducing helper functions and consolidated logic. Enhanced comment handling by simplifying data models and adding proper author checks. Updated SQL queries to align with the refined comment management system.
1 parent 7a9b70c commit 8f4679c

File tree

14 files changed

+3230
-66
lines changed

14 files changed

+3230
-66
lines changed

api/Conduit.postman_collection.json

Lines changed: 2014 additions & 0 deletions
Large diffs are not rendered by default.

api/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# RealWorld API Spec
2+
3+
## Running API tests locally
4+
5+
To locally run the provided Postman collection against your backend, execute:
6+
7+
```
8+
APIURL=http://localhost:3000/api ./run-api-tests.sh
9+
```
10+
11+
For more details, see [`run-api-tests.sh`](run-api-tests.sh).

0 commit comments

Comments
 (0)