I will be very grateful if you write to me what needs to be fixed here. So that I can improve my skill. https://www.linkedin.com/in/ivan-kovalchuk-7740a511a/
Сreate a schema and tables. The script is located in the resources folder.
- Spring Boot
- Spring Security
- Spring jdbctemplate
- JWT
https://nameless-falls-13226.herokuapp.com/
All requests you can send to this server
/api/user/signup
POST requests with body:
{
"username": "soddd",
"firstName": "firstName",
"lastName": "lastName",
"email": "emaishlwws@gmail.com",
"password": "password"
}
/login
POST requests with body:
{
"username": "soddd",
"password": "password"
}
A token will come from the server. He is in Header.
Token example:
Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJzb21lbmFtZSIsImF1dGhvcml0aWVzIjpbXSwiaWF0IjoxNTkzNDI1MTUzLCJleHAiOjE1OTQyNTI4MDB9.S_5V7B_nifFs186v0Zo8lI4dupL-CvoN368hKJPYdtf_G4ANObbdW1j6K8pyB4lP5NrMJUIHCJ3e5t7Ve2K02A
Be sure to insert token into the request header. Example:
Authorization
Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJzb21lbmFtZSIsImF1dGhvcml0aWVzIjpbXSwiaWF0IjoxNTkzNDI1MTUzLCJleHAiOjE1OTQyNTI4MDB9.S_5V7B_nifFs186v0Zo8lI4dupL-CvoN368hKJPYdtf_G4ANObbdW1j6K8pyB4lP5NrMJUIHCJ3e5t7Ve2K02A
/api/user/updateUser
PUT requests with body:
Indicate user id and data for editing
{
"userId": 1,
"username": "rrrrrrr",
"firstName": "ttttttt",
"lastName": "lllllllll",
"password": "password"
}
/api/user/deleteUser
DELETE requests with body:
Indicate user id for deleting
{
"userId": 1
}
/api/user/getUser
POST requests with body:
Indicate user id
{
"userId": 1
}
/api/user/getUsers
Pagination limit: 10 users per page
POST requests with body:
{
"page": 1
}
/api/task/add
When creating a task, it is assigned to its creator
PUT requests with body:
{
"status": "View",
"title": "iiiisdi",
"description": "some description"
}
/api/task/updateTask
PUT requests with body:
{
"id": 65,
"status": "Done",
"title": "iiiisdi",
"description": "some else description"
}
/api/task/deleteTask
DELETE requests with task id in body:
{
"id": 1
}
/api/task/getTasks
Sorting by new / old users by'desc' or 'asc'
POST requests with body:
{
"status": "Done",
"orderType": "desc"
}
/api/task/changeTaskResponsible
PUT requests with body:
{
"taskId": 5,
"userId": 7
}
I would be very grateful if you looked at the code and write me what needs to be fixed. Professional opinion is very important for me.