Class: api

REST~ api

new api(app, db)

Construction function. Wraps complete Aidbot's RESTful webservice and authentication and authorization mechanism.

Parameters:
Name Type Description
app Function

instance of Express application

db Connection

database connection

Source:
  • api.js, line 12

Methods

<inner> checkAuth(req, res, next)

User authentication checking middleware.

Parameters:
Name Type Description
req
res
next
Source:
  • api.js, line 38