Skip to content

Merge potential solution of issue Add get-current-user endpoint #90 - #91

Open
do159hu wants to merge 3 commits into
nerd-out:mainfrom
do159hu:main
Open

Merge potential solution of issue Add get-current-user endpoint #90#91
do159hu wants to merge 3 commits into
nerd-out:mainfrom
do159hu:main

Conversation

@do159hu

@do159hu do159hu commented Nov 9, 2022

Copy link
Copy Markdown

Issue link: #90

I created endpoint GET /user using flask session extension.

Some changes:

  1. requirements.txt was updated
  2. to file sniffr/app.py I added session start (when Flask run)
  3. to login endpoint I added user id to session
  4. in file sniffr/user_routes/user_routes.py I created new edpoint to get current user

TODO in future: When somebody will create logout endpoint, I recommend clear : session['id'] = None

I believe it helped you. Wish you the best!

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.

1 participant