e23edd1d55
Bumps [minimist](https://github.com/minimistjs/minimist), [minimist](https://github.com/minimistjs/minimist) and [mkdirp](https://github.com/isaacs/node-mkdirp). These dependencies needed to be updated together. Updates `minimist` from 1.2.5 to 1.2.8 - [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md) - [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.8) Updates `minimist` from 1.2.0 to 1.2.8 - [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md) - [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.8) Updates `mkdirp` from 0.5.1 to 0.5.5 - [Changelog](https://github.com/isaacs/node-mkdirp/blob/main/CHANGELOG.md) - [Commits](https://github.com/isaacs/node-mkdirp/compare/0.5.1...v0.5.5) --- updated-dependencies: - dependency-name: minimist dependency-type: indirect - dependency-name: minimist dependency-type: indirect - dependency-name: mkdirp dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> |
||
---|---|---|
api | ||
utils | ||
.gitignore | ||
LICENSE | ||
README.md | ||
package-lock.json | ||
package.json | ||
server.js |
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] }.