fenya123 / forum123

Flask application written for educational purposes.
http://193.124.115.171/
1 stars 1 forks source link

99: Add rest endpoint to get user #100

Closed EugeneTurkin closed 1 year ago

EugeneTurkin commented 1 year ago

We are going to add REST API interface to our forum, and we decided to begin with creating endpoints without authentication. It won't be secure but it will make development process easier. We will add authentication to these endpoints in the future.

First REST API endpoints we want to implement are probably the easiest one. We need an endpoint which will return the info about particular user. In our application whole info is only id and username.

So in the scope of this task we need to create an endpoint GET /api/users/42 which will return user info in json format.

All REST API code should be in src/api and should have "package by layered feature" structure. All REST API endpoints should start with /api. To make rest api's on flask we're going to use flask-restx library.