Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
module.exports = class MainController extends Marionette.Object
queuMethod: false
initialize: ->
App.vent.on 'profile:ready', () =>
if @queuMethod
@[@queuMethod](@queuArgs)
@queuMethod = false
dashboard: ->
roles = App.request('data:profile').get('roles')
if roles?
if "admin" in roles
@dashboardAdmin()
else
@dashboardClient()
else
@queuMethod = 'dashboard'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment