feat: add recordPing() as middleware to /graphql
This commit is contained in:
parent
a0ed5a3a0e
commit
e30d3c035d
2 changed files with 9 additions and 0 deletions
7
lib/middlewares/recordPing.js
Normal file
7
lib/middlewares/recordPing.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
const plugins = require('../plugins')
|
||||
|
||||
module.exports = (req, res, next) =>
|
||||
plugins(req.settings, req.deviceId)
|
||||
.recordPing(req.deviceTime, req.query.version, req.query.model)
|
||||
.then(() => next())
|
||||
.catch(() => next())
|
||||
Loading…
Add table
Add a link
Reference in a new issue