- GET books or authors from DB (no authorization needed)
- Log in as ADMIN or AUTHOR user (see data.sql for sample users' data)
- Admin could modify authors list, authors could modify book list
To test the app you should add .env file with the following parameters:
- DB_NAME=DATABASE_NAME
- DB_USER=DATABASE_USER
- DB_PASS=DATABASE_PASSWORD
- DB_URL=jdbc:postgresql://database:5432/DATABASE_NAME
- SERVER_PORT=PORT_FOR_API
- Get all books: GET domain/book
- Get all authors: GET domain/author
- Add new book: POST domain/book
- Add new author: POST domain/author
- Remove book: DELETE domain/book
- Remove author: DELETE domain/author
{
"title": "Book title",
"description": "Book description",
"publishingDate": "2022-11-01",
"price": 20.0,
"authorEmail": "[email protected]"
}
{
"title": "Title of book to remove"
}
{
"email": "[email protected]",
"name": "Author Name",
"birthDate": "2022-11-01"
}
{
"email": "[email protected]"
}