- get // returns all books
{
"success": boolean,
"data": [
{
"print": string,
"_id": string,
"title": string,
"desc": string,
"author": string,
"file": {
"fieldname": string,
"originalname": string,
"encoding": string,
"mimetype": string,
"destination": string,
"filename": string,
"path": string,
"size": number
},
"__v": number
}
]
}
- post + file (name need to be bookFile) // adds book
{
"title": string,
"desc": string,
"author": string,
"print": ?string
}
in html file:
<form action="/actions/book" method="post" enctype="multipart/form-data">
<input type="file" name="bookFile" />
</form>
- delete // removes book
{
"id": string
}
- patch // edits book
{
"id": string,
"data": {
// here things to change
}
}
- post // checks is user in the bus
{
"tagName": string
}
- get // all buses data
{
"success": boolean,
"data": [
{
"usersToday": number,
"readingUsersToday": number,
"_id": string,
"line": string,
"beaconsTagName": string
}
]
}
- get // pdf file - stream