feat: Add dateUpdated field to Post model and update PostController #21
+149
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several new features and improvements to the
devopsknowledgeshareapi
project. The most significant changes include the addition ofAuthorController
andAuthorService
classes, new search capabilities inPostController
, an update field in thePost
class, and corresponding updates to the test classes.New Classes:
src/main/java/com/liatrio/dojo/devopsknowledgeshareapi/AuthorController.java
: A newAuthorController
class was added. It uses theAuthorService
to handle requests to the/authors
endpoint.src/main/java/com/liatrio/dojo/devopsknowledgeshareapi/AuthorService.java
: A newAuthorService
class was added. It currently returns an empty list of authors.Updates to Existing Classes:
src/main/java/com/liatrio/dojo/devopsknowledgeshareapi/Post.java
: ThePost
class was updated to include adateUpdated
field with corresponding getter and setter methods.src/main/java/com/liatrio/dojo/devopsknowledgeshareapi/PostController.java
: ThePostController
class was updated to include new search capabilities. It can now handle requests to search posts by title, first name, and link. Additionally, a PUT request handler was added to update existing posts. [1] [2]src/main/java/com/liatrio/dojo/devopsknowledgeshareapi/PostRepository.java
: ThePostRepository
interface was updated to include new methods for finding posts by title, first name, and link.Test Updates:
src/test/java/com/liatrio/dojo/devopsknowledgeshareapi/AuthorControllerTest.java
: A new test class forAuthorController
was added. It currently includes a single test for thegetAuthors
method.src/test/java/com/liatrio/dojo/devopsknowledgeshareapi/PostTest.java
: ThePostTest
class was updated to include new tests for thedateUpdated
field in thePost
class. [1] [2]