2014-02-04 16:29:13 -05:00
|
|
|
module.exports.handlers =
|
2014-12-18 00:53:59 -05:00
|
|
|
'analytics_log_event': 'analytics/analytics_log_event_handler'
|
2015-01-14 14:09:01 -05:00
|
|
|
'analytics_perday': 'analytics/analytics_perday_handler'
|
|
|
|
'analytics_string': 'analytics/analytics_string_handler'
|
2015-07-31 19:19:36 -04:00
|
|
|
'analytics_stripe_invoice': 'analytics/analytics_stripe_invoice_handler'
|
2014-12-17 12:53:39 -05:00
|
|
|
# TODO: Disabling this until we know why our app servers CPU grows out of control.
|
2014-12-17 17:17:50 -05:00
|
|
|
# 'analytics_users_active': 'analytics/analytics_users_active_handler'
|
2014-02-04 16:29:13 -05:00
|
|
|
'article': 'articles/article_handler'
|
2014-12-16 20:46:24 -05:00
|
|
|
'campaign': 'campaigns/campaign_handler'
|
2015-04-01 14:56:48 -04:00
|
|
|
'clan': 'clans/clan_handler'
|
2015-11-02 20:07:23 -05:00
|
|
|
'classroom': 'classrooms/classroom_handler'
|
2015-08-29 10:15:35 -04:00
|
|
|
'course': 'courses/course_handler'
|
|
|
|
'course_instance': 'courses/course_instance_handler'
|
2014-02-04 16:29:13 -05:00
|
|
|
'level': 'levels/level_handler'
|
|
|
|
'level_component': 'levels/components/level_component_handler'
|
|
|
|
'level_feedback': 'levels/feedbacks/level_feedback_handler'
|
|
|
|
'level_session': 'levels/sessions/level_session_handler'
|
|
|
|
'level_system': 'levels/systems/level_system_handler'
|
2014-04-08 17:10:50 -04:00
|
|
|
'patch': 'patches/patch_handler'
|
2014-11-11 20:40:03 -05:00
|
|
|
'payment': 'payments/payment_handler'
|
2014-11-01 17:15:57 -04:00
|
|
|
'purchase': 'purchases/purchase_handler'
|
2014-02-04 16:29:13 -05:00
|
|
|
'thang_type': 'levels/thangs/thang_type_handler'
|
|
|
|
'user': 'users/user_handler'
|
2014-08-14 14:55:43 -04:00
|
|
|
'user_code_problem': 'user_code_problems/user_code_problem_handler'
|
2014-06-17 16:03:08 -04:00
|
|
|
'user_remark': 'users/remarks/user_remark_handler'
|
2014-07-09 19:24:14 -04:00
|
|
|
'mail_sent': 'mail/sent/mail_sent_handler'
|
2014-05-18 09:04:54 -04:00
|
|
|
'achievement': 'achievements/achievement_handler'
|
2014-05-18 10:51:23 -04:00
|
|
|
'earned_achievement': 'achievements/earned_achievement_handler'
|
2015-03-07 19:30:25 -05:00
|
|
|
'poll': 'polls/poll_handler'
|
2015-03-19 18:02:45 -04:00
|
|
|
'prepaid': 'prepaids/prepaid_handler'
|
2015-03-27 14:22:21 -04:00
|
|
|
'subscription': 'payments/subscription_handler'
|
2015-06-05 09:48:09 -04:00
|
|
|
'trial_request': 'trial_requests/trial_request_handler'
|
2015-04-01 14:56:48 -04:00
|
|
|
'user_polls_record': 'polls/user_polls_record_handler'
|
2014-02-04 16:29:13 -05:00
|
|
|
|
2015-11-11 22:29:56 -05:00
|
|
|
module.exports.handlerUrlOverrides =
|
|
|
|
'analytics_log_event': 'analytics_log_event'
|
2015-11-13 14:11:07 -05:00
|
|
|
'analytics_perday': 'analytics_perday'
|
2015-11-11 22:29:56 -05:00
|
|
|
'analytics_string': 'analytics.string'
|
|
|
|
'analytics_stripe_invoice': 'analytics.stripe.invoice'
|
|
|
|
'level_component': 'level.component'
|
|
|
|
'level_feedback': 'level.feedback'
|
|
|
|
'level_session': 'level.session'
|
|
|
|
'level_system': 'level.system'
|
|
|
|
'thang_type': 'thang.type'
|
2015-11-12 15:01:33 -05:00
|
|
|
'thang_component': 'thang.component'
|
2015-11-11 22:29:56 -05:00
|
|
|
'user_code_problem': 'user.code.problem'
|
|
|
|
'user_remark': 'user.remark'
|
|
|
|
'mail_sent': 'mail.sent'
|
|
|
|
'user_polls_record': 'user.polls.record'
|
2015-11-13 14:56:50 -05:00
|
|
|
'trial_request': 'trial.request'
|
2015-11-11 22:29:56 -05:00
|
|
|
|
2014-02-04 16:29:13 -05:00
|
|
|
module.exports.routes =
|
|
|
|
[
|
2014-06-03 10:14:10 -04:00
|
|
|
'routes/admin'
|
2014-02-04 16:29:13 -05:00
|
|
|
'routes/auth'
|
|
|
|
'routes/contact'
|
|
|
|
'routes/db'
|
|
|
|
'routes/file'
|
|
|
|
'routes/folder'
|
2014-08-15 10:20:45 -04:00
|
|
|
'routes/github'
|
2014-02-04 16:29:13 -05:00
|
|
|
'routes/languages'
|
|
|
|
'routes/mail'
|
|
|
|
'routes/sprites'
|
2014-02-06 16:25:11 -05:00
|
|
|
'routes/queue'
|
2014-06-14 23:59:28 -04:00
|
|
|
'routes/stacklead'
|
2014-12-02 23:01:35 -05:00
|
|
|
'routes/stripe'
|
2014-02-05 18:13:42 -05:00
|
|
|
]
|
2014-07-03 15:20:06 -04:00
|
|
|
|
|
|
|
mongoose = require 'mongoose'
|
|
|
|
module.exports.modules = modules = # by collection name
|
|
|
|
'achievements': 'Achievement'
|
|
|
|
'level.sessions': 'level.session'
|
|
|
|
'users': 'User'
|
|
|
|
|
|
|
|
mongoose.modelNameByCollection = (collection) ->
|
|
|
|
mongoose.model modules[collection] if collection of modules
|