Skip to content
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

Difference between article of List and article #8

Open
GalichCZ opened this issue Aug 1, 2023 · 0 comments
Open

Difference between article of List and article #8

GalichCZ opened this issue Aug 1, 2023 · 0 comments

Comments

@GalichCZ
Copy link

GalichCZ commented Aug 1, 2023

Hello, I'm currently doing this task for applifting to get a chance to start work with you, but I've noticed, that API has some weird behavior.
Like https://fullstack.exercise.applifting.cz/articles returns list of articles, each item of this list has that object structure

{
            "articleId": "2019525c-7aff-408f-97f2-9ea9170d9f63",
            "title": "title",
            "perex": "perex",
            "imageId": null,
            "createdAt": "2023-08-01T10:09:38.110977",
            "lastUpdatedAt": "2023-08-01T10:09:38.110977"
} 

and if i get exact one article by its id it looks like this

{
    "articleId": "57b0049b-4690-45b5-9019-19a377c27b04",
    "title": "title",
    "perex": "perex",
    "content": null,
    "imageId": null,
    "createdAt": "2023-07-31T13:01:58.924668",
    "lastUpdatedAt": "2023-07-31T13:01:58.924668",
    "comments": []
}

So the problem is in pole comments, I understand that it is not relevant to send all comments but isn't it really to send list of DTO with the length of the comments array ? like this

{
            "articleId": "2019525c-7aff-408f-97f2-9ea9170d9f63",
            "title": "title",
            "perex": "perex",
            "imageId": null,
            "createdAt": "2023-08-01T10:09:38.110977",
            "lastUpdatedAt": "2023-08-01T10:09:38.110977",
            "comments": 4
} 

why is it important ? because the figma layout shows that page with the list of articles has number of comments in each article preview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant