This Application help admin to add, delete user and show all users' info. The application also allow users to submit requests to DB by validating the user's request and save his data into DataBase.
- The project has two controllers "UserController" and "UserFlowController".
- UserController is responsible for CRUD operations of the user (Add, get, getAll and delete user).
- UserFlowController is responsible for allowing user to submit his requests.
- to execute the unit test run:
- to execute the unit test with coverage:
- GET User by Civil ID.
- GET All Users.
- Add User
- Delete User
- Submit Request
curl --location --request GET 'http://localhost:8080/user/get?civilId=1'
curl --location --request GET 'http://localhost:8080/user/getAll'
curl --location --request POST 'http://localhost:8080/user/add' \
--header 'Content-Type: application/json' \
--data-raw '{
"civilId" : 1,
"name":"test",
"expiryDate":"2020-10-21 10:00:00"
}'
curl --location --request GET 'http://localhost:8080/user/delete?civilId=2'
curl --location --request POST 'localhost:8080/request/submit' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "",
"status": "ACCEPTED",
"attachmentList": [
{
"name": "1"
},
{
"name": "12"
}
],
"user": {
"civilId": "2"
}
}'