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

As a student I would like to have a timeline with my posts and posts from friends #18

Open
elinamat opened this issue Jun 23, 2022 · 9 comments
Assignees

Comments

@elinamat
Copy link

No description provided.

@mathiasbrito-dci
Copy link
Contributor

This issue depends on posts so it is necessary to first define a model for Post. Also the stories #2 #10 and #19 are related to posts, so sync with your colleagues to define the model for posts

@WaseemZahoor
Copy link

still working on it, need some time to get the results, today would working with the peer to discuss the further planning that how can we have post from our friend on our timeline.

@elinamat
Copy link
Author

elinamat commented Jul 5, 2022

Hallo Mathias!
we are receiving an internal error from fastapi when trying to use the request inspector on http://127.0.0.1:8000/docs

Failed to load API definition.
Errors
Fetch error
Internal Server Error /openapi.json

@mathiasbrito-dci
Copy link
Contributor

Can you please get pull, we had this issue at the beginning but it was fixed...

@mathiasbrito-dci
Copy link
Contributor

Is the problem fixed Elina?

@elinamat
Copy link
Author

elinamat commented Jul 5, 2022

mathias i found which lines of code crushing the fastapi... but i can't find the reason
main.py:
app.include_router(post_routes)

@elinamat
Copy link
Author

elinamat commented Jul 6, 2022

Hi Mathias!

  1. our HTTP POST Request for the "submit a new post", inside the fast apirequest inspector on 127.0.0.1, gives back three responses two of them are 200, but one is 422... Why?!
  2. we can't retrieve posts by username, we are using the wrong syntax. Please check:
    @post_routes.get('/posts/{creator}{username}')

@mathiasbrito-dci
Copy link
Contributor

seems that a slash is missing in @post_routes.get('/posts/{creator}{username}'), I think that you mean @post_routes.get('/posts/{creator}/{username}')

@elinamat
Copy link
Author

elinamat commented Jul 6, 2022

we've changed things in the PostController and now the following error comes up:
in get_posts_by_username
if post.creator['username'] == username: #we tried without quotes too
TypeError: 'User' object is not subscriptable

elinamat pushed a commit to elinamat/tdd_student-social-app that referenced this issue Jul 7, 2022
mathiasbrito-dci added a commit that referenced this issue Jul 11, 2022
Final changes - Issue  #18 -Elina +Wasi
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

3 participants