-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Controller for getArticle and getArticlebyID #18
base: main
Are you sure you want to change the base?
Conversation
You can try to improve the readability by re-implementing the post-processing steps instead of just copy and paste. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please find out how we fetch data from the DB (filter and option) and how we process the result after getting the data in v1.
- I noticed you used
console.log
to print some information, but in practice, you should use logger. And since we haven't decided what should be logged, you could simply remove allconsole.log
. - Keep the
Service
as general as possible because it might be called by various functions. - It is better to integrate the code related to the article into
ArticleModule
(please create a new file), and import it toAppModule
.
0586ccb
to
25a6a5a
Compare
…ler to test Latest News Cache
It's almost complet. To ensure that your code is correct, try writing some unit tests for the controller and end-to-end tests for the APIs. If you're unsure how to proceed after reading the documentations below, you can reference the codebase in /test (though it's not entirely complete) or ask ChatGPT for assistance. Ref: |
e5ada87
to
c4475c4
Compare
We have created a controller for the articles get function, but there is a slight problem, the GET request does not return an error, however, get article returns an empty array [] and get article by id returns nothing. We are not sure if our function is wrong.