Add auth middleware in api unit. Now only authorized user can access api unit

This commit is contained in:
Vishal Banthia
2015-12-02 21:14:42 +09:00
parent 41f306a7f0
commit e0a45391ab
5 changed files with 102 additions and 0 deletions

View File

@@ -329,4 +329,8 @@ dbapi.loadAccessTokens = function(email) {
}))
}
dbapi.loadAccessToken = function(id) {
return db.run(r.table('accessTokens').get(id))
}
module.exports = dbapi