PVV sitt biblI/Otek
This repository has been archived on 2024-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
dependabot[bot] 9f75b710f4
Bump qs, body-parser and express
Bumps [qs](https://github.com/ljharb/qs) to 6.11.0 and updates ancestor dependencies [qs](https://github.com/ljharb/qs), [body-parser](https://github.com/expressjs/body-parser) and [express](https://github.com/expressjs/express). These dependencies need to be updated together.


Updates `qs` from 6.5.2 to 6.11.0
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.11.0)

Updates `body-parser` from 1.19.0 to 1.20.2
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/body-parser/compare/1.19.0...1.20.2)

Updates `express` from 4.16.4 to 4.18.2
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.16.4...4.18.2)

---
updated-dependencies:
- dependency-name: qs
  dependency-type: indirect
- dependency-name: body-parser
  dependency-type: direct:production
- dependency-name: express
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-06 14:21:01 +00:00
api Essential backend functionality, including logins. 2019-08-21 12:52:12 +02:00
utils Essential backend functionality, including logins. 2019-08-21 12:52:12 +02:00
.gitignore Initial commit 2019-08-21 10:26:52 +00:00
LICENSE Initial commit 2019-08-21 10:26:52 +00:00
README.md Added routes. 2019-08-21 11:08:03 +00:00
package-lock.json Bump qs, body-parser and express 2023-05-06 14:21:01 +00:00
package.json Bump qs, body-parser and express 2023-05-06 14:21:01 +00:00
server.js Essential backend functionality, including logins. 2019-08-21 12:52:12 +02:00

README.md

Biblio

RESTful API for PVV's library system (BiblI/Otek).

It's about time I put this up somewhere.

Currently assumes a running local MongoDB instance called "ils", with a password-protected admin user "ils_operator".

To run, type:

npm install
npm start [password]

ExpressJS is used for routing, bcrypt is used for passwords, mongoose is used to interface with MongoDB.

HATEOAS isn't implemented yet.

In lieu of Swagger:

GET /books: List all books in library.
POST /books: Add a book to the library. 

GET /books/:bookId : Get specific entry for a book.
PUT /books/:bookId : Requires update_books permission. Updates entry for book.
DELETE /books/:bookId : Requires delete_books permission. Deletes entry for book.

GET /users: List all users in library.
POST /users: Requires add_users permission. Add a user to the system. If any non-default permissions are needed, change_permissions is required.

GET /users/:userId : Get specific user entry.
PUT /users/:userId : Requires update_users permission. Updates user entry.
DELETE /users/:userId : Requires delete_users permission. Deletes user. Not allowed if user is currently borrowing any books.

GET /borrow: Requires borrow_books permission. Lists logged in user's borrowed books. 
PUT /borrow: Borrows a book, sent in the format { bookId: [id] }.
DELETE /borrow: Deletes a book, sent in the format { bookId: [id] }.