Expand activity tracking and add PasswordResetAlert job

This commit is contained in:
garrettmills
2020-07-13 09:35:11 -05:00
parent d29e6f057a
commit 143fccf179
7 changed files with 136 additions and 15 deletions

View File

@@ -3,7 +3,7 @@ const uuid = require('uuid/v4')
class ReflectController extends Controller {
static get services() {
return [...super.services, 'routers', 'models']
return [...super.services, 'routers', 'models', 'activity']
}
async get_tokens(req, res, next) {
@@ -81,6 +81,7 @@ class ReflectController extends Controller {
})
await token.save()
await this.activity.api_token_created({ req, oauth_client_id: client.uuid })
return res.api({
id: token.id,
token: token.accessToken,