Skip to content

Conversation

@KateF20
Copy link
Owner

@KateF20 KateF20 commented Jul 3, 2023

No description provided.

KateF20 added 2 commits July 2, 2023 22:10
authentication with JWT
todos and auth separated in 2 routers --> main is an app with both routers included
endpoint names changed in todos.py
Base automatically changed from setup_db to master July 9, 2023 12:07
routers/todos.py Outdated
if user is None:
raise HTTPException(status_code=401, detail='Authentication Failed')

todo = db.query(Todo).filter(Todo.id == todo_id).first()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
todo = db.query(Todo).filter(Todo.id == todo_id).first()
todo = get_object_or_404(Todo, Todo.id == todo_id, detail='Todo not found')

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

у fastapi нет такого модуля. или ты имел в виду использовать написанный нами тогда собственный?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я предложил тебе написать тебе такой хелпер

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а, поняла. ок

extra filters applied
settings created
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

Successfully merging this pull request may close these issues.

3 participants