mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-30 02:55:43 -05:00
e3abb9ceb3
Watching for these events: Level completed User registered Playtime of 30s in a level Purchase Payment Subscribe Earned an achievement
16 lines
487 B
CoffeeScript
16 lines
487 B
CoffeeScript
AnalyticsUsersActive = require './AnalyticsUsersActive'
|
|
Handler = require '../commons/Handler'
|
|
|
|
class AnalyticsUsersActiveHandler extends Handler
|
|
modelClass: AnalyticsUsersActive
|
|
jsonSchema: require '../../app/schemas/models/analytics_users_active'
|
|
|
|
hasAccess: (req) ->
|
|
req.method in ['GET'] or req.user?.isAdmin()
|
|
|
|
makeNewInstance: (req) ->
|
|
instance = super(req)
|
|
instance.set('creator', req.user._id)
|
|
instance
|
|
|
|
module.exports = new AnalyticsUsersActiveHandler()
|