       id: req.params.username
       per: 2,
       perBlocks: 5
-      page: 1
-      q: parseInt(req.query.page) or 1
+      page: parseInt(req.query.page, 10) or 1
+      q: req.query.q
       sort: req.query.sort?.toUpperCase() or 'UPDATED_AT'
 
 @channelsAPI = (req, res, next) ->
-  send = channelVariables req
+  send = channelsVariables req
   graphQL send
     .then (response) ->
       res.setHeader 'Content-Type', 'application/json'

      res.render "index", author: res.locals.author, blocks: blocks.models

@index = (req, res, next) ->

  return next() unless res.locals.author

  channels = new UserBlocks null,

      res.locals.sd.USER = author.toJSON()
    complete: -> next()

showTips = (req, res) ->
  (req.user?.id is res.locals.author.id and req.user?.get('show_tour') isnt false)

