Commit 8f4679c
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- api
- src/main
- kotlin/io/github/nomisrev
- repo
- routes
- service
- sqldelight/io/github/nomisrev/sqldelight
14 files changed
+3230
-66
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments