Skip to content

aduda091/queueManagementBackend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Queue Management Application - Backend

Master's degree project consisting of:

Usage

npm install
npm start

Endpoints

/users

POST /users/register // Registers a new user
POST /users/login   // Returns a token
GET /users/me         // Returns user info and reservations, needs token
PUT /users/me         // Edit logged in user, needs token

/facilities

GET /facilities         // Returns facilities array
POST /facilities         // Creates a facility, needs admin token 
GET /facilities/:id         // Returns a facility by ID
PUT /facilities/:id         // Edits a facility by ID, needs admin token
POST /facilities/:id         // Adds a queue to facility by ID, needs token

/queues

GET /queues/:id         // Returns a single queue by ID
PUT /queues/:id         // Edits a single queue by ID, needs admin token
DELETE /queues/:id/reset         // Resets a queue by ID (current:0, next:1, delete belonging reservations), needs admin token
DELETE /queues/:id/next         // Advances a queue by ID, returns next reservation (or first if current==0), needs admin token

/reservations

GET /reservations/:id         // Returns a single reservation by ID
POST /reservations/:id         // Enter a queue by ID, needs token
GET /reservations/queue/:id         // Returns all reservations in a queue by ID
DELETE /reservations/:id         // Exit a queue (remove reservation) by ID, needs token

/tests

POST /tests/addRandomUser         // Register a new random user, needs admin token

JSON Format (Schema)

User

{firstName, lastName, mail, password, role(defaults to 'user')}

Facility

{name, address, mail, telephone}

Queue

{name, facility, current, next}

Reservation

{user, queue, time, number}

Releases

No releases published

Packages

No packages published