<commit_before>Fair = require '../../models/fair'

@assignFair = (req, res, next) ->
  return next() unless res.locals.profile

  fair = new Fair id: res.locals.profile.get('owner').id
  fair.fetch
    cache: true
    error: res.backboneError
    success: ->
      res.locals.fair = fair
      res.locals.sd.FAIR = fair.toJSON()
      next()

@index = (req, res) ->
  res.render("index")

@visitors = (req, res) ->
  res.render("visitors")

@programming = (req, res) ->
  res.render("programming")<commit_msg>Check for fair profile type before fair info app<commit_after>Fair = require '../../models/fair'

@assignFair = (req, res, next) ->
  return next() unless res.locals.profile?.isFair()

  fair = new Fair id: res.locals.profile.get('owner').id
  fair.fetch
    cache: true
    error: res.backboneError
    success: ->
      res.locals.fair = fair
      res.locals.sd.FAIR = fair.toJSON()
      next()

@index = (req, res) ->
  res.render("index")

@visitors = (req, res) ->
  res.render("visitors")

@programming = (req, res) ->
  res.render("programming")
{'fraction_non_alphanumeric': 0.17309501411100658, 'fraction_numerical': 0.0, 'mean_word_length': 3.0303030303030303, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1525994', 'n_tokens_mistral': 380, 'n_tokens_neox': 366, 'n_words': 85}